mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 21:06:31 +03:00
broadcasts (#2707)
* add Chattype::Broadcast and create_broadcast_list() * do not disclose recipients for broadcasts * allow sending/add-/remove-member for broadcast * set broadcast subject same as for one-to-one chats * broadcast-recipient-list does not include SELF * use special icon for broadcast groups * generate initial broadcast names * make clippy happy * send BCC message unencrypted to avoid unexpected disclosing; encryption is opportunistic anyway. if we have 'protected chats' at some point, we can think that over. * reword 'To:'-group * simplify can-send-check * add broadcast tests * tweak comments * Update deltachat-ffi/deltachat.h Co-authored-by: Hocuri <hocuri@gmx.de> * change name of can_edit() to is_self_in_chat() Co-authored-by: Hocuri <hocuri@gmx.de>
This commit is contained in:
@@ -1330,6 +1330,19 @@ pub unsafe extern "C" fn dc_create_group_chat(
|
||||
})
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn dc_create_broadcast_list(context: *mut dc_context_t) -> u32 {
|
||||
if context.is_null() {
|
||||
eprintln!("ignoring careless call to dc_create_broadcast_list()");
|
||||
return 0;
|
||||
}
|
||||
let ctx = &*context;
|
||||
block_on(chat::create_broadcast_list(ctx))
|
||||
.log_err(ctx, "Failed to create broadcast list")
|
||||
.map(|id| id.to_u32())
|
||||
.unwrap_or(0)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn dc_is_contact_in_chat(
|
||||
context: *mut dc_context_t,
|
||||
|
||||
Reference in New Issue
Block a user