mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 01:46:34 +03:00
jsonrpc: add is_broadcast property
to `ChatListItemFetchResult`
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
and `dc_event_emitter_unref()` should be used instead of
|
||||
`dc_accounts_event_emitter_unref`.
|
||||
- add `dc_contact_was_seen_recently()` #3560
|
||||
- jsonrpc: add `is_broadcast` property to `ChatListItemFetchResult`
|
||||
|
||||
### Changes
|
||||
- order contact lists by "last seen";
|
||||
|
||||
@@ -42,6 +42,8 @@ pub enum ChatListItemFetchResult {
|
||||
is_pinned: bool,
|
||||
is_muted: bool,
|
||||
is_contact_request: bool,
|
||||
/// true when chat is a broadcastlist
|
||||
is_broadcast: bool,
|
||||
/// contact id if this is a dm chat (for view profile entry in context menu)
|
||||
dm_chat_contact: Option<u32>,
|
||||
},
|
||||
@@ -121,6 +123,7 @@ pub(crate) async fn get_chat_list_item_by_id(
|
||||
is_pinned: visibility == ChatVisibility::Pinned,
|
||||
is_muted: chat.is_muted(),
|
||||
is_contact_request: chat.is_contact_request(),
|
||||
is_broadcast: chat.get_type() == Chattype::Broadcast,
|
||||
dm_chat_contact,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user