From 92859ce6fc3849b20b959351244cb31a11de4110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Pettersson?= Date: Wed, 19 Nov 2014 06:15:04 +0100 Subject: [PATCH] Fixed group chats not being deleted on close. --- src/twc-chat.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/twc-chat.c b/src/twc-chat.c index e59b8ab..99e7b05 100644 --- a/src/twc-chat.c +++ b/src/twc-chat.c @@ -330,6 +330,17 @@ twc_chat_buffer_close_callback(void *data, { struct t_twc_chat *chat = data; + if (chat->profile->tox && chat->group_number >= 0) + { + int rc = tox_del_groupchat(chat->profile->tox, chat->group_number); + if (rc != 0) + { + weechat_printf(chat->profile->buffer, + "%swarning: failed to leave group chat", + weechat_prefix("error")); + } + } + twc_list_remove_with_data(chat->profile->chats, chat); twc_chat_free(chat);