Added error messages when group chat invites fail.
This commit is contained in:
parent
48093e1833
commit
8ab3ce630b
@ -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
|
||||
{
|
||||
|
@ -248,16 +248,25 @@ twc_group_invite_callback(Tox *tox,
|
||||
void *data)
|
||||
{
|
||||
struct t_twc_profile *profile = data;
|
||||
char *friend_name = twc_get_name_nt(profile->tox, friend_number);
|
||||
|
||||
if (type == TOX_GROUPCHAT_TYPE_TEXT)
|
||||
{
|
||||
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);
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user