From 12bc364e42da5ce0ef54e7f04cb823e210c934b4 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 23 Sep 2020 23:53:59 +0200 Subject: [PATCH 1/7] split DC_EVENT_MSGS_NOTICED off DC_EVENT_MSGS_CHANGED the new event can be used for updating the badge counter. to get the old behaviour, implementations can just do the same on both events. --- deltachat-ffi/deltachat.h | 20 ++++++++++++++++++-- deltachat-ffi/src/lib.rs | 3 +++ src/chat.rs | 10 ++-------- src/contact.rs | 9 +++------ src/events.rs | 5 +++++ src/message.rs | 5 +---- 6 files changed, 32 insertions(+), 20 deletions(-) diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index ceb13752e..628871df8 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -1122,7 +1122,7 @@ dc_array_t* dc_get_fresh_msgs (dc_context_t* context); * but are still waiting for being marked as "seen" using dc_markseen_msgs() * (IMAP/MDNs is not done for noticed messages). * - * Calling this function usually results in the event #DC_EVENT_MSGS_CHANGED. + * Calling this function usually results in the event #DC_EVENT_MSGS_NOTICED. * See also dc_marknoticed_all_chats(), dc_marknoticed_contact() and dc_markseen_msgs(). * * @memberof dc_context_t @@ -1517,7 +1517,7 @@ void dc_forward_msgs (dc_context_t* context, const uint3 * as _noticed_. See also dc_marknoticed_chat() and * dc_markseen_msgs() * - * Calling this function usually results in the event #DC_EVENT_MSGS_CHANGED. + * Calling this function usually results in the event #DC_EVENT_MSGS_NOTICED. * * @memberof dc_context_t * @param context The context object. @@ -1536,6 +1536,8 @@ void dc_marknoticed_contact (dc_context_t* context, uint32_t co * Moreover, if messages belong to a chat with ephemeral messages enabled, * the ephemeral timer is started for these messages. * + * Calling this function usually results in the event #DC_EVENT_MSGS_NOTICED. + * * @memberof dc_context_t * @param context The context object. * @param msg_ids An array of uint32_t containing all the messages IDs that should be marked as seen. @@ -4607,6 +4609,20 @@ void dc_event_unref(dc_event_t* event); #define DC_EVENT_INCOMING_MSG 2005 +/** + * Messages were marked noticed or seen. + * The ui may update badge counters or stop showing a chatlist-item with a bold font. + * + * This event is emitted eg. when calling dc_markseen_msgs(), dc_marknoticed_chat() or dc_marknoticed_contact(). + * Do not try to derive the state of an item from just the fact you received the event; + * use eg. dc_msg_get_state() or dc_get_fresh_msg_cnt() for this purpose. + * + * @param data1 (int) chat_id or 0 if the event affects multiple chats. + * @param data2 0 + */ +#define DC_EVENT_MSGS_NOTICED 2008 + + /** * A single message is sent successfully. State changed from DC_STATE_OUT_PENDING to * DC_STATE_OUT_DELIVERED, see dc_msg_get_state(). diff --git a/deltachat-ffi/src/lib.rs b/deltachat-ffi/src/lib.rs index ab37466e9..ba88ac848 100644 --- a/deltachat-ffi/src/lib.rs +++ b/deltachat-ffi/src/lib.rs @@ -362,6 +362,7 @@ pub unsafe extern "C" fn dc_event_get_data1_int(event: *mut dc_event_t) -> libc: | EventType::ErrorSelfNotInGroup(_) => 0, EventType::MsgsChanged { chat_id, .. } | EventType::IncomingMsg { chat_id, .. } + | EventType::MsgsNoticed(chat_id) | EventType::MsgDelivered { chat_id, .. } | EventType::MsgFailed { chat_id, .. } | EventType::MsgRead { chat_id, .. } @@ -407,6 +408,7 @@ pub unsafe extern "C" fn dc_event_get_data2_int(event: *mut dc_event_t) -> libc: | EventType::ConfigureProgress { .. } | EventType::ImexProgress(_) | EventType::ImexFileWritten(_) + | EventType::MsgsNoticed(_) | EventType::ChatModified(_) => 0, EventType::MsgsChanged { msg_id, .. } | EventType::IncomingMsg { msg_id, .. } @@ -446,6 +448,7 @@ pub unsafe extern "C" fn dc_event_get_data2_str(event: *mut dc_event_t) -> *mut } EventType::MsgsChanged { .. } | EventType::IncomingMsg { .. } + | EventType::MsgsNoticed(_) | EventType::MsgDelivered { .. } | EventType::MsgFailed { .. } | EventType::MsgRead { .. } diff --git a/src/chat.rs b/src/chat.rs index 08e03190b..66d1143c6 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -1795,10 +1795,7 @@ pub async fn marknoticed_chat(context: &Context, chat_id: ChatId) -> Result<(), ) .await?; - context.emit_event(EventType::MsgsChanged { - chat_id: ChatId::new(0), - msg_id: MsgId::new(0), - }); + context.emit_event(EventType::MsgsNoticed(chat_id)); Ok(()) } @@ -1827,10 +1824,7 @@ pub async fn marknoticed_all_chats(context: &Context) -> Result<(), Error> { ) .await?; - context.emit_event(EventType::MsgsChanged { - msg_id: MsgId::new(0), - chat_id: ChatId::new(0), - }); + context.emit_event(EventType::MsgsNoticed(ChatId::new(0))); Ok(()) } diff --git a/src/contact.rs b/src/contact.rs index 32059c2d0..fdb9550ee 100644 --- a/src/contact.rs +++ b/src/contact.rs @@ -16,7 +16,7 @@ use crate::error::{bail, ensure, format_err, Result}; use crate::events::EventType; use crate::key::{DcKey, SignedPublicKey}; use crate::login_param::LoginParam; -use crate::message::{MessageState, MsgId}; +use crate::message::MessageState; use crate::mimeparser::AvatarAction; use crate::param::*; use crate::peerstate::*; @@ -263,7 +263,7 @@ impl Contact { /// Mark all messages sent by the given contact /// as *noticed*. See also dc_marknoticed_chat() and dc_markseen_msgs() /// - /// Calling this function usually results in the event `#DC_EVENT_MSGS_CHANGED`. + /// Calling this function usually results in the event `#DC_EVENT_MSGS_NOTICED`. pub async fn mark_noticed(context: &Context, id: u32) { if context .sql @@ -274,10 +274,7 @@ impl Contact { .await .is_ok() { - context.emit_event(EventType::MsgsChanged { - chat_id: ChatId::new(0), - msg_id: MsgId::new(0), - }); + context.emit_event(EventType::MsgsNoticed(ChatId::new(0))); } } diff --git a/src/events.rs b/src/events.rs index 87006a49b..c67f465ad 100644 --- a/src/events.rs +++ b/src/events.rs @@ -186,6 +186,11 @@ pub enum EventType { #[strum(props(id = "2005"))] IncomingMsg { chat_id: ChatId, msg_id: MsgId }, + /// Messages were seen or noticed. + /// If chat_id is 0, this affects multiple chats. + #[strum(props(id = "2008"))] + MsgsNoticed(ChatId), + /// A single message is sent successfully. State changed from DC_STATE_OUT_PENDING to /// DC_STATE_OUT_DELIVERED, see dc_msg_get_state(). #[strum(props(id = "2010"))] diff --git a/src/message.rs b/src/message.rs index e4311c3aa..704472d42 100644 --- a/src/message.rs +++ b/src/message.rs @@ -1283,10 +1283,7 @@ pub async fn markseen_msgs(context: &Context, msg_ids: Vec) -> bool { } if send_event { - context.emit_event(EventType::MsgsChanged { - chat_id: ChatId::new(0), - msg_id: MsgId::new(0), - }); + context.emit_event(EventType::MsgsNoticed(ChatId::new(0))); } true From 5c1b69c3c563221903597b4e9cfbff9315a40398 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 24 Sep 2020 00:27:40 +0200 Subject: [PATCH 2/7] if possible, set chat_id in DC_EVENT_MSGS_NOTICED even emitted by dc_markseen_msgs() --- src/message.rs | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/message.rs b/src/message.rs index 704472d42..3395ca939 100644 --- a/src/message.rs +++ b/src/message.rs @@ -1226,6 +1226,7 @@ pub async fn markseen_msgs(context: &Context, msg_ids: Vec) -> bool { .with_conn(move |conn| { let mut stmt = conn.prepare_cached(concat!( "SELECT", + " m.chat_id AS chat_id,", " m.state AS state,", " c.blocked AS blocked", " FROM msgs m LEFT JOIN chats c ON c.id=m.chat_id", @@ -1236,6 +1237,7 @@ pub async fn markseen_msgs(context: &Context, msg_ids: Vec) -> bool { for id in msg_ids.into_iter() { let query_res = stmt.query_row(paramsv![id], |row| { Ok(( + row.get::<_, ChatId>("chat_id")?, row.get::<_, MessageState>("state")?, row.get::<_, Option>("blocked")? .unwrap_or_default(), @@ -1244,8 +1246,8 @@ pub async fn markseen_msgs(context: &Context, msg_ids: Vec) -> bool { if let Err(rusqlite::Error::QueryReturnedNoRows) = query_res { continue; } - let (state, blocked) = query_res.map_err(Into::::into)?; - msgs.push((id, state, blocked)); + let (chat_id, state, blocked) = query_res.map_err(Into::::into)?; + msgs.push((id, chat_id, state, blocked)); } Ok(msgs) @@ -1254,8 +1256,10 @@ pub async fn markseen_msgs(context: &Context, msg_ids: Vec) -> bool { .unwrap_or_default(); let mut send_event = false; + let mut last_chat_id = ChatId::new(0); + let mut chat_ids_are_unique = true; - for (id, curr_state, curr_blocked) in msgs.into_iter() { + for (id, curr_chat_id, curr_state, curr_blocked) in msgs.into_iter() { if let Err(err) = id.start_ephemeral_timer(context).await { error!( context, @@ -1280,10 +1284,22 @@ pub async fn markseen_msgs(context: &Context, msg_ids: Vec) -> bool { update_msg_state(context, id, MessageState::InNoticed).await; send_event = true; } + + if last_chat_id.is_unset() { + last_chat_id = curr_chat_id; + } else if last_chat_id != curr_chat_id { + chat_ids_are_unique = false; + } } if send_event { - context.emit_event(EventType::MsgsNoticed(ChatId::new(0))); + context.emit_event(EventType::MsgsNoticed( + if chat_ids_are_unique && !last_chat_id.is_unset() { + last_chat_id + } else { + ChatId::new(0) + }, + )); } true From b5e1b1a2d2968edcadc4c7422ab296b32dbfc9b1 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 24 Sep 2020 01:37:20 +0200 Subject: [PATCH 3/7] test for DC_EVENT_MSGS_NOTICED --- python/tests/test_account.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/tests/test_account.py b/python/tests/test_account.py index d54f6fb16..80dc0ce8c 100644 --- a/python/tests/test_account.py +++ b/python/tests/test_account.py @@ -882,7 +882,13 @@ class TestOnlineAccount: lp.sec("mark messages as seen on ac2, wait for changes on ac1") ac2.direct_imap.idle_start() ac1.direct_imap.idle_start() + ac2.mark_seen_messages([msg2, msg4]) + ev = ac2._evtracker.get_matching("DC_EVENT_MSGS_NOTICED") + assert msg2.chat.id == msg4.chat.id + assert ev.data1 == msg2.chat.id + assert ev.data2 == 0 + ac2.direct_imap.idle_check(terminate=True) lp.step("1") for i in range(2): From f3c7d2f9c63517dc46c171831ea7152e4ecbe882 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 24 Sep 2020 11:23:44 +0200 Subject: [PATCH 4/7] remove unused function dc_marknoticed_all_chats() --- deltachat-ffi/deltachat.h | 12 +----------- deltachat-ffi/src/lib.rs | 16 ---------------- src/chat.rs | 29 ----------------------------- 3 files changed, 1 insertion(+), 56 deletions(-) diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index 628871df8..4666342ce 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -1123,7 +1123,7 @@ dc_array_t* dc_get_fresh_msgs (dc_context_t* context); * (IMAP/MDNs is not done for noticed messages). * * Calling this function usually results in the event #DC_EVENT_MSGS_NOTICED. - * See also dc_marknoticed_all_chats(), dc_marknoticed_contact() and dc_markseen_msgs(). + * See also dc_marknoticed_contact() and dc_markseen_msgs(). * * @memberof dc_context_t * @param context The context object as returned from dc_context_new(). @@ -1133,16 +1133,6 @@ dc_array_t* dc_get_fresh_msgs (dc_context_t* context); void dc_marknoticed_chat (dc_context_t* context, uint32_t chat_id); -/** - * Same as dc_marknoticed_chat() but for _all_ chats. - * - * @memberof dc_context_t - * @param context The context object as returned from dc_context_new(). - * @return None. - */ -void dc_marknoticed_all_chats (dc_context_t* context); - - /** * Returns all message IDs of the given types in a chat. * Typically used to show a gallery. diff --git a/deltachat-ffi/src/lib.rs b/deltachat-ffi/src/lib.rs index ba88ac848..213cb8b4e 100644 --- a/deltachat-ffi/src/lib.rs +++ b/deltachat-ffi/src/lib.rs @@ -973,22 +973,6 @@ pub unsafe extern "C" fn dc_marknoticed_chat(context: *mut dc_context_t, chat_id }) } -#[no_mangle] -pub unsafe extern "C" fn dc_marknoticed_all_chats(context: *mut dc_context_t) { - if context.is_null() { - eprintln!("ignoring careless call to dc_marknoticed_all_chats()"); - return; - } - let ctx = &*context; - - block_on(async move { - chat::marknoticed_all_chats(&ctx) - .await - .log_err(ctx, "Failed marknoticed all chats") - .unwrap_or(()) - }) -} - fn from_prim(s: S) -> Option where T: FromPrimitive, diff --git a/src/chat.rs b/src/chat.rs index 66d1143c6..e4a164f5b 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -1800,35 +1800,6 @@ pub async fn marknoticed_chat(context: &Context, chat_id: ChatId) -> Result<(), Ok(()) } -pub async fn marknoticed_all_chats(context: &Context) -> Result<(), Error> { - if !context - .sql - .exists( - "SELECT id - FROM msgs - WHERE state=10;", - paramsv![], - ) - .await? - { - return Ok(()); - } - - context - .sql - .execute( - "UPDATE msgs - SET state=13 - WHERE state=10;", - paramsv![], - ) - .await?; - - context.emit_event(EventType::MsgsNoticed(ChatId::new(0))); - - Ok(()) -} - pub async fn get_chat_media( context: &Context, chat_id: ChatId, From e9733e7525b4c73ac83a2749dc60c163b8a80746 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 24 Sep 2020 12:10:48 +0200 Subject: [PATCH 5/7] always set chat_id on DC_EVENT_MSGS_NOTICED --- deltachat-ffi/deltachat.h | 15 +++++++++------ src/contact.rs | 9 ++++----- src/events.rs | 2 +- src/message.rs | 25 ++++++------------------- 4 files changed, 20 insertions(+), 31 deletions(-) diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index 4666342ce..0cdaea382 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -1503,11 +1503,13 @@ void dc_forward_msgs (dc_context_t* context, const uint3 /** - * Mark all messages sent by the given contact - * as _noticed_. See also dc_marknoticed_chat() and - * dc_markseen_msgs() + * Mark all messages sent by the given contact as _noticed_. + * This function is typically used to ignore a user in the deaddrop temporarily ("Not now" button). * - * Calling this function usually results in the event #DC_EVENT_MSGS_NOTICED. + * The contact is expected to belong to the deaddrop; + * only one #DC_EVENT_MSGS_NOTICED with chat_id=DC_CHAT_ID_DEADDROP may be emitted. + * + * See also dc_marknoticed_chat() and dc_markseen_msgs() * * @memberof dc_context_t * @param context The context object. @@ -1526,7 +1528,8 @@ void dc_marknoticed_contact (dc_context_t* context, uint32_t co * Moreover, if messages belong to a chat with ephemeral messages enabled, * the ephemeral timer is started for these messages. * - * Calling this function usually results in the event #DC_EVENT_MSGS_NOTICED. + * The given messages are expected to belong to the same chat or to the deaddrop; + * only one #DC_EVENT_MSGS_NOTICED event with this chat may be emitted. * * @memberof dc_context_t * @param context The context object. @@ -4607,7 +4610,7 @@ void dc_event_unref(dc_event_t* event); * Do not try to derive the state of an item from just the fact you received the event; * use eg. dc_msg_get_state() or dc_get_fresh_msg_cnt() for this purpose. * - * @param data1 (int) chat_id or 0 if the event affects multiple chats. + * @param data1 (int) chat_id * @param data2 0 */ #define DC_EVENT_MSGS_NOTICED 2008 diff --git a/src/contact.rs b/src/contact.rs index fdb9550ee..8c8524e07 100644 --- a/src/contact.rs +++ b/src/contact.rs @@ -260,10 +260,9 @@ impl Contact { Ok(contact_id) } - /// Mark all messages sent by the given contact - /// as *noticed*. See also dc_marknoticed_chat() and dc_markseen_msgs() - /// - /// Calling this function usually results in the event `#DC_EVENT_MSGS_NOTICED`. + /// Mark messages from a contact as noticed. + /// The contact is expected to belong to the deaddrop, + /// therefore, DC_EVENT_MSGS_NOTICED(DC_CHAT_ID_DEADDROP) is emitted. pub async fn mark_noticed(context: &Context, id: u32) { if context .sql @@ -274,7 +273,7 @@ impl Contact { .await .is_ok() { - context.emit_event(EventType::MsgsNoticed(ChatId::new(0))); + context.emit_event(EventType::MsgsNoticed(ChatId::new(DC_CHAT_ID_DEADDROP))); } } diff --git a/src/events.rs b/src/events.rs index c67f465ad..f884a7589 100644 --- a/src/events.rs +++ b/src/events.rs @@ -187,7 +187,7 @@ pub enum EventType { IncomingMsg { chat_id: ChatId, msg_id: MsgId }, /// Messages were seen or noticed. - /// If chat_id is 0, this affects multiple chats. + /// chat id is always set. #[strum(props(id = "2008"))] MsgsNoticed(ChatId), diff --git a/src/message.rs b/src/message.rs index 3395ca939..ec4a098d2 100644 --- a/src/message.rs +++ b/src/message.rs @@ -1255,9 +1255,8 @@ pub async fn markseen_msgs(context: &Context, msg_ids: Vec) -> bool { .await .unwrap_or_default(); - let mut send_event = false; - let mut last_chat_id = ChatId::new(0); - let mut chat_ids_are_unique = true; + // we expect all messages belong to the same chat or to the deaddrop. + let mut updated_chat_id = ChatId::new(0); for (id, curr_chat_id, curr_state, curr_blocked) in msgs.into_iter() { if let Err(err) = id.start_ephemeral_timer(context).await { @@ -1278,28 +1277,16 @@ pub async fn markseen_msgs(context: &Context, msg_ids: Vec) -> bool { job::Job::new(Action::MarkseenMsgOnImap, id.to_u32(), Params::new(), 0), ) .await; - send_event = true; + updated_chat_id = curr_chat_id; } } else if curr_state == MessageState::InFresh { update_msg_state(context, id, MessageState::InNoticed).await; - send_event = true; - } - - if last_chat_id.is_unset() { - last_chat_id = curr_chat_id; - } else if last_chat_id != curr_chat_id { - chat_ids_are_unique = false; + updated_chat_id = ChatId::new(DC_CHAT_ID_DEADDROP); } } - if send_event { - context.emit_event(EventType::MsgsNoticed( - if chat_ids_are_unique && !last_chat_id.is_unset() { - last_chat_id - } else { - ChatId::new(0) - }, - )); + if !updated_chat_id.is_unset() { + context.emit_event(EventType::MsgsNoticed(updated_chat_id)); } true From ab90b6b3905e7bf39080403959c1836af013fdbf Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 24 Sep 2020 14:05:34 +0200 Subject: [PATCH 6/7] emit multiple events if messages given to dc_markseen_msgs() belong to different chats --- deltachat-ffi/deltachat.h | 3 +-- src/message.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/deltachat-ffi/deltachat.h b/deltachat-ffi/deltachat.h index 0cdaea382..2624c202d 100644 --- a/deltachat-ffi/deltachat.h +++ b/deltachat-ffi/deltachat.h @@ -1528,8 +1528,7 @@ void dc_marknoticed_contact (dc_context_t* context, uint32_t co * Moreover, if messages belong to a chat with ephemeral messages enabled, * the ephemeral timer is started for these messages. * - * The given messages are expected to belong to the same chat or to the deaddrop; - * only one #DC_EVENT_MSGS_NOTICED event with this chat may be emitted. + * One #DC_EVENT_MSGS_NOTICED event is emitted per modified chat. * * @memberof dc_context_t * @param context The context object. diff --git a/src/message.rs b/src/message.rs index ec4a098d2..726ec5a1a 100644 --- a/src/message.rs +++ b/src/message.rs @@ -19,6 +19,7 @@ use crate::mimeparser::{FailureReport, SystemMessage}; use crate::param::*; use crate::pgp::*; use crate::stock::StockMessage; +use std::collections::BTreeMap; // In practice, the user additionally cuts the string themselves // pixel-accurate. @@ -1255,8 +1256,7 @@ pub async fn markseen_msgs(context: &Context, msg_ids: Vec) -> bool { .await .unwrap_or_default(); - // we expect all messages belong to the same chat or to the deaddrop. - let mut updated_chat_id = ChatId::new(0); + let mut updated_chat_ids = BTreeMap::new(); for (id, curr_chat_id, curr_state, curr_blocked) in msgs.into_iter() { if let Err(err) = id.start_ephemeral_timer(context).await { @@ -1277,16 +1277,16 @@ pub async fn markseen_msgs(context: &Context, msg_ids: Vec) -> bool { job::Job::new(Action::MarkseenMsgOnImap, id.to_u32(), Params::new(), 0), ) .await; - updated_chat_id = curr_chat_id; + updated_chat_ids.insert(curr_chat_id, true); } } else if curr_state == MessageState::InFresh { update_msg_state(context, id, MessageState::InNoticed).await; - updated_chat_id = ChatId::new(DC_CHAT_ID_DEADDROP); + updated_chat_ids.insert(ChatId::new(DC_CHAT_ID_DEADDROP), true); } } - if !updated_chat_id.is_unset() { - context.emit_event(EventType::MsgsNoticed(updated_chat_id)); + for (updated_chat_id, _) in &updated_chat_ids { + context.emit_event(EventType::MsgsNoticed(*updated_chat_id)); } true From f0fb1bfdcb01b92bd2e37b3be3c9c635115806a3 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 24 Sep 2020 14:36:04 +0200 Subject: [PATCH 7/7] make clippy happy --- src/message.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/message.rs b/src/message.rs index 726ec5a1a..9230313c5 100644 --- a/src/message.rs +++ b/src/message.rs @@ -1285,7 +1285,7 @@ pub async fn markseen_msgs(context: &Context, msg_ids: Vec) -> bool { } } - for (updated_chat_id, _) in &updated_chat_ids { + for updated_chat_id in updated_chat_ids.keys() { context.emit_event(EventType::MsgsNoticed(*updated_chat_id)); }