mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-06 12:00:11 +02:00
allow adding members-without-peerstate to a group, fixes https://github.com/deltachat/deltachat-android/issues/306
This commit is contained in:
parent
e8dbd860f1
commit
c96ee38266
1 changed files with 7 additions and 8 deletions
|
@ -3187,15 +3187,14 @@ int mrmailbox_add_contact_to_chat4(mrmailbox_t* mailbox, uint32_t chat_id, uint3
|
|||
}
|
||||
else
|
||||
{
|
||||
if( !mrapeerstate_load_by_addr__(peerstate, mailbox->m_sql, contact->m_addr) ) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if( chat->m_type==MR_CHAT_TYPE_VERIFIED_GROUP
|
||||
&& mrcontact_is_verified__(contact, peerstate)!=MRV_BIDIRECTIONAL ) {
|
||||
if( chat->m_type == MR_CHAT_TYPE_VERIFIED_GROUP )
|
||||
{
|
||||
if( !mrapeerstate_load_by_addr__(peerstate, mailbox->m_sql, contact->m_addr)
|
||||
|| mrcontact_is_verified__(contact, peerstate) != MRV_BIDIRECTIONAL ) {
|
||||
mrmailbox_log_error(mailbox, 0, "Only bidirectional verified contacts can be added to verfied groups.");
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
if( 0==mrmailbox_add_to_chat_contacts_table__(mailbox, chat_id, contact_id) ) {
|
||||
goto cleanup;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue