@@ -151,14 +151,21 @@ static void callback_connection_status(Tox *tox, int fid, uint8_t status, void *
151
151
debug ("Friend Online/Offline (%u): %u\n" , fid , status );
152
152
}
153
153
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 ))
155
155
{
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
+
157
164
if (gid != -1 ) {
158
165
postmessage (GROUP_ADD , gid , 0 , NULL );
159
166
}
160
167
161
- debug ("Group Invite (%i,f:%i)\n" , gid , fid );
168
+ debug ("Group Invite (%i,f:%i) type %u \n" , gid , fid , type );
162
169
}
163
170
164
171
static void callback_group_message (Tox * tox , int gid , int pid , const uint8_t * message , uint16_t length , void * UNUSED (userdata ))
0 commit comments