always set chat_id on DC_EVENT_MSGS_NOTICED

This commit is contained in:
B. Petersen
2020-09-24 12:10:48 +02:00
parent f3c7d2f9c6
commit e9733e7525
4 changed files with 20 additions and 31 deletions

View File

@@ -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)));
}
}