1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-06 03:50:08 +02:00

prepare createion of verified groups

This commit is contained in:
B. Petersen 2018-04-20 23:34:02 +02:00
parent 971cab81ce
commit e12f347ac1
3 changed files with 5 additions and 4 deletions

View file

@ -814,7 +814,7 @@ char* mrmailbox_cmdline(mrmailbox_t* mailbox, const char* cmdline)
else if( strcmp(cmd, "creategroup")==0 )
{
if( arg1 ) {
int chat_id = mrmailbox_create_group_chat(mailbox, arg1);
int chat_id = mrmailbox_create_group_chat(mailbox, 0, arg1);
ret = chat_id!=0? mr_mprintf("Groupchat#%lu created successfully.", chat_id) : COMMAND_FAILED;
}
else {

View file

@ -2962,14 +2962,15 @@ int mrmailbox_add_contact_to_chat__(mrmailbox_t* mailbox, uint32_t chat_id, uint
* @memberof mrmailbox_t
*
* @param mailbox Mailbox object as created by mrmailbox_new().
*
* @param verified If set to 1 the function creates a secure verfied group.
* Only secure-verified members are allowd in these groups and end-to-end-encryption is always enabled.
* @param chat_name The name of the group chat to create.
* The name may be changed later using mrmailbox_set_chat_name().
* To find out the name of a group later, see mrchat_t::m_name
*
* @return The chat ID of the new group chat, 0 on errors.
*/
uint32_t mrmailbox_create_group_chat(mrmailbox_t* mailbox, const char* chat_name)
uint32_t mrmailbox_create_group_chat(mrmailbox_t* mailbox, int verified, const char* chat_name)
{
uint32_t chat_id = 0;
int locked = 0;

View file

@ -257,7 +257,7 @@ mrchat_t* mrmailbox_get_chat (mrmailbox_t*, uint32_t chat_id);
/* Handle group chats */
uint32_t mrmailbox_create_group_chat (mrmailbox_t*, const char* name);
uint32_t mrmailbox_create_group_chat (mrmailbox_t*, int verified, const char* name);
int mrmailbox_is_contact_in_chat (mrmailbox_t*, uint32_t chat_id, uint32_t contact_id);
int mrmailbox_add_contact_to_chat (mrmailbox_t*, uint32_t chat_id, uint32_t contact_id);
int mrmailbox_remove_contact_from_chat (mrmailbox_t*, uint32_t chat_id, uint32_t contact_id);