mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-15 05:23:02 +01:00
group invite API change
This commit is contained in:
parent
ff69cdd253
commit
5c98c1c51e
@ -567,9 +567,10 @@ static void chat_onGroupInvite(ToxWindow *self, Tox *m, int32_t friendnumber, co
|
||||
if (self->num != friendnumber)
|
||||
return;
|
||||
|
||||
if (length != TOX_GROUP_INVITE_DATA_SIZE)
|
||||
return;
|
||||
if (Friends.list[friendnumber].group_invite.data)
|
||||
free(Friends.list[friendnumber].group_invite.data);
|
||||
|
||||
Friends.list[friendnumber].group_invite.data = malloc(length * sizeof(uint8_t));
|
||||
memcpy(Friends.list[friendnumber].group_invite.data, invite_data, length);
|
||||
Friends.list[friendnumber].group_invite.length = length;
|
||||
|
||||
|
@ -49,7 +49,7 @@ struct LastOnline {
|
||||
};
|
||||
|
||||
struct GroupInvite {
|
||||
uint8_t data[TOX_GROUP_INVITE_DATA_SIZE];
|
||||
uint8_t *data;
|
||||
uint16_t length;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user