Skip to content

Commit 1b963ad

Browse files
committedNov 11, 2014
Toxcore api change fix.
1 parent 207e534 commit 1b963ad

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed
 

‎tox_callbacks.h

+10-3
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,21 @@ static void callback_connection_status(Tox *tox, int fid, uint8_t status, void *
151151
debug("Friend Online/Offline (%u): %u\n", fid, status);
152152
}
153153

154-
static void callback_group_invite(Tox *tox, int fid, const uint8_t *data, uint16_t length, void *UNUSED(userdata))
154+
static void callback_group_invite(Tox *tox, int fid, uint8_t type, const uint8_t *data, uint16_t length, void *UNUSED(userdata))
155155
{
156-
int gid = tox_join_groupchat(tox, fid, data, length);
156+
int gid = -1;
157+
if (type == TOX_GROUPCHAT_TYPE_TEXT) {
158+
gid = tox_join_groupchat(tox, fid, data, length);
159+
} else if (type == TOX_GROUPCHAT_TYPE_AV) {
160+
//gid = toxav_join_av_groupchat(tox, fid, data, length, &callback_av_group_audio, NULL);
161+
gid = -1;
162+
}
163+
157164
if(gid != -1) {
158165
postmessage(GROUP_ADD, gid, 0, NULL);
159166
}
160167

161-
debug("Group Invite (%i,f:%i)\n", gid, fid);
168+
debug("Group Invite (%i,f:%i) type %u\n", gid, fid, type);
162169
}
163170

164171
static void callback_group_message(Tox *tox, int gid, int pid, const uint8_t *message, uint16_t length, void *UNUSED(userdata))

0 commit comments

Comments
 (0)
Please sign in to comment.