diff --git a/CHANGELOG.md b/CHANGELOG.md index db26b63d7..c5b9184ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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"; diff --git a/deltachat-jsonrpc/src/api/types/chat_list.rs b/deltachat-jsonrpc/src/api/types/chat_list.rs index 39c7ea629..97bbcc739 100644 --- a/deltachat-jsonrpc/src/api/types/chat_list.rs +++ b/deltachat-jsonrpc/src/api/types/chat_list.rs @@ -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, }, @@ -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, }) }