1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-06 09:26:44 +02:00

core API update and refactor group invites a bit

This commit is contained in:
Jfreegman
2014-09-27 22:50:20 -04:00
parent 784883f773
commit 05661ca9b6
7 changed files with 44 additions and 20 deletions

View File

@ -123,14 +123,15 @@ void cmd_join_group(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*ar
return;
}
const char *groupkey = Friends.list[self->num].groupchat_key;
const char *groupkey = Friends.list[self->num].group_invite.key;
uint16_t length = Friends.list[self->num].group_invite.length;
if (!Friends.list[self->num].groupchat_pending) {
if (!Friends.list[self->num].group_invite.pending) {
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "No pending group chat invite.");
return;
}
int groupnum = tox_join_groupchat(m, self->num, (uint8_t *) groupkey);
int groupnum = tox_join_groupchat(m, self->num, (uint8_t *) groupkey, length);
if (groupnum == -1) {
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Group chat instance failed to initialize.");