--- a/finch/gntconv.c Fri Jun 18 00:28:00 2021 -0500
+++ b/finch/gntconv.c Fri Jun 18 00:46:45 2021 -0500
@@ -384,22 +384,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)) { + PurpleConversation *conv; + PurpleChatConversation *chat; - if(!PURPLE_IS_CHAT_CONVERSATION(list->data)) {
- conv = PURPLE_CONVERSATION(list->data);
+ conv = PURPLE_CONVERSATION(list->data); + chat = PURPLE_CHAT_CONVERSATION(conv); + left = purple_chat_conversation_has_left(chat); - 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 be automatically rejoined in the chat when "
- "the account reconnects."),
- PURPLE_MESSAGE_NO_LOG);
+ 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 be automatically rejoined in the " + "chat when the account reconnects."), + PURPLE_MESSAGE_NO_LOG); list = g_list_delete_link(list, list);