--- a/pidgin/gtkconv.c Fri Jun 18 00:00:00 2021 -0500
+++ b/pidgin/gtkconv.c Fri Jun 18 00:28:00 2021 -0500
@@ -4413,21 +4413,26 @@
/* We are about to sign off. See which chats we are currently in, and mark
* them for rejoin on reconnect. */
- PurpleConversation *conv = NULL;
- if(!PURPLE_IS_CHAT_CONVERSATION(list->data)) {
- conv = PURPLE_CONVERSATION(list->data);
- if (!purple_chat_conversation_has_left(PURPLE_CHAT_CONVERSATION(conv)) &&
- purple_conversation_get_account(conv) == account) {
- g_object_set_data(G_OBJECT(conv), "want-to-rejoin", GINT_TO_POINTER(TRUE));
- purple_conversation_write_system_message(conv,
- _("The account has disconnected and you are no "
- "longer in this chat. You will automatically "
- "rejoin the chat when the account reconnects."),
- PURPLE_MESSAGE_NO_LOG);
+ if(PURPLE_IS_CHAT_CONVERSATION(list->data)) { + PurpleConversation *conv; + PurpleChatConversation *chat; + conv = PURPLE_CONVERSATION(list->data); + chat = PURPLE_CHAT_CONVERSATION(conv); + left = purple_chat_conversation_has_left(chat); + if(!left && purple_conversation_get_account(conv) == account) { + g_object_set_data(G_OBJECT(conv), "want-to-rejoin", + GINT_TO_POINTER(TRUE)); + purple_conversation_write_system_message( + _("The account has disconnected and you are no longer in " + "this chat. You will automatically rejoin the chat when " + "the account reconnects."), + PURPLE_MESSAGE_NO_LOG); list = g_list_delete_link(list, list);