mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
join_groupchat now fails when not direct connected.
This commit is contained in:
parent
c49d74a125
commit
8d8083b38c
|
@ -1184,6 +1184,11 @@ int join_groupchat(Messenger *m, int32_t friendnumber, uint8_t *friend_group_pub
|
|||
if (groupnum == -1)
|
||||
return -1;
|
||||
|
||||
IP_Port friend_ip = get_friend_ipport(m, friendnumber);
|
||||
|
||||
if (friend_ip.ip.family == 0)
|
||||
return -1;
|
||||
|
||||
id_copy(data, friend_group_public_key);
|
||||
id_copy(data + crypto_box_PUBLICKEYBYTES, m->chats[groupnum]->self_public_key);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user