Compare commits
No commits in common. "0c1f08a9db271807e760d35b258799be2b2d924e" and "40dec27adc3555bc439874d23a080cf0a44b24ea" have entirely different histories.
0c1f08a9db
...
40dec27adc
@ -29,7 +29,6 @@ pub fn attach_user_application(
|
||||
|
||||
let user_application =
|
||||
c.create_callback(move |q: OwnedJsObject| -> Result<_, ScriptError> {
|
||||
println!("user_application is called");
|
||||
let db = db.clone();
|
||||
let user: teloxide::types::User = match from_js(q.context(), &q) {
|
||||
Ok(q) => q,
|
||||
@ -39,7 +38,6 @@ pub fn attach_user_application(
|
||||
let application = futures::executor::block_on(
|
||||
Application::new(user.clone()).store_db(&mut db.write().unwrap()),
|
||||
)?;
|
||||
println!("there1");
|
||||
|
||||
let db2 = db.clone();
|
||||
let msg = tokio::task::block_in_place(move || {
|
||||
@ -52,7 +50,6 @@ pub fn attach_user_application(
|
||||
.await
|
||||
})
|
||||
});
|
||||
println!("there2");
|
||||
let msg = match msg {
|
||||
Ok(msg) => msg,
|
||||
Err(err) => {
|
||||
@ -70,12 +67,10 @@ pub fn attach_user_application(
|
||||
.answer("left_application_msg", None, None),
|
||||
)
|
||||
.unwrap();
|
||||
println!("there3");
|
||||
futures::executor::block_on(
|
||||
MessageForward::new(msg.chat.id.0, msg.id.0, chat_id, msg_id, false)
|
||||
.store_db(&mut db.write().unwrap()),
|
||||
)?;
|
||||
println!("there4");
|
||||
|
||||
let ret = true;
|
||||
Ok(ret)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user