diff --git a/src/twc-commands.c b/src/twc-commands.c index 5241a3f..885f649 100644 --- a/src/twc-commands.c +++ b/src/twc-commands.c @@ -525,6 +525,10 @@ twc_cmd_group(void *data, struct t_gui_buffer *buffer, // create a buffer for the new group chat if (group_number >= 0) twc_chat_search_group(profile, group_number, true); + else + weechat_printf(profile->buffer, + "%sCould not join group chat (unknown error)", + weechat_prefix("error")); } else { diff --git a/src/twc-tox-callbacks.c b/src/twc-tox-callbacks.c index 7c02277..b18a048 100644 --- a/src/twc-tox-callbacks.c +++ b/src/twc-tox-callbacks.c @@ -248,16 +248,25 @@ twc_group_invite_callback(Tox *tox, void *data) { struct t_twc_profile *profile = data; - - int64_t rc = twc_group_chat_invite_add(profile, friend_number, - (uint8_t *)invite_data, length); - char *friend_name = twc_get_name_nt(profile->tox, friend_number); - weechat_printf(profile->buffer, - "%sReceived a group chat invite from %s; " - "join with \"/group join %d\"", - weechat_prefix("network"), - friend_name, rc); + + if (type == TOX_GROUPCHAT_TYPE_TEXT) + { + int64_t rc = twc_group_chat_invite_add(profile, friend_number, + (uint8_t *)invite_data, length); + + weechat_printf(profile->buffer, + "%sReceived a group chat invite from %s; " + "join with \"/group join %d\"", + weechat_prefix("network"), friend_name, rc); + } + else if (type == TOX_GROUPCHAT_TYPE_AV) + { + weechat_printf(profile->buffer, + "%sReceived an audio group chat invite from %s; " + "these are currently unsupported and can not be joined", + weechat_prefix("network"), friend_name); + } free(friend_name); }