mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
delete groupchat when join fails
This commit is contained in:
parent
9d154029cb
commit
d8406db113
|
@ -1206,8 +1206,10 @@ int join_groupchat(Messenger *m, int32_t friendnumber, const uint8_t *friend_gro
|
||||||
|
|
||||||
IP_Port friend_ip = get_friend_ipport(m, friendnumber);
|
IP_Port friend_ip = get_friend_ipport(m, friendnumber);
|
||||||
|
|
||||||
if (friend_ip.ip.family == 0)
|
if (friend_ip.ip.family == 0) {
|
||||||
|
del_groupchat(m, groupnum);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
id_copy(data, friend_group_public_key);
|
id_copy(data, friend_group_public_key);
|
||||||
id_copy(data + crypto_box_PUBLICKEYBYTES, m->chats[groupnum]->self_public_key);
|
id_copy(data + crypto_box_PUBLICKEYBYTES, m->chats[groupnum]->self_public_key);
|
||||||
|
@ -1218,6 +1220,7 @@ int join_groupchat(Messenger *m, int32_t friendnumber, const uint8_t *friend_gro
|
||||||
return groupnum;
|
return groupnum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
del_groupchat(m, groupnum);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user