diff options
author | George Hazan <ghazan@miranda.im> | 2023-02-22 17:02:52 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-02-22 17:02:52 +0300 |
commit | a14e6388fd3266c6815a4ebaad3a942896c3e80a (patch) | |
tree | 84147df60f4be482f3c5074ce1f8adcdbf46b4a2 /protocols | |
parent | 061a20a9cf305cf5fabe2a35b7d8a86eb8d6b154 (diff) |
if one needs to remove a chat's contact, just remove it and don't fuck my brain
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Discord/src/dispatch.cpp | 6 | ||||
-rw-r--r-- | protocols/Facebook/src/groupchats.cpp | 2 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/src/core.cpp | 2 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/groupchats.cpp | 2 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_chats.cpp | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp index 10c39e8241..d0619f3c02 100644 --- a/protocols/Discord/src/dispatch.cpp +++ b/protocols/Discord/src/dispatch.cpp @@ -109,7 +109,7 @@ void CDiscordProto::OnCommandChannelDeleted(const JSONNode &pRoot) else {
CDiscordGuild *pGuild = FindGuild(guildId);
if (pGuild != nullptr) {
- Chat_Terminate(pUser->si, true);
+ db_delete_contact(pUser->si->hContact);
pUser->si = nullptr;
}
}
@@ -185,11 +185,11 @@ void CDiscordProto::OnCommandGuildDeleted(const JSONNode &pRoot) for (auto &it : arUsers.rev_iter())
if (it->pGuild == pGuild) {
- Chat_Terminate(it->si, true);
+ db_delete_contact(it->si->hContact);
arUsers.removeItem(&it);
}
- Chat_Terminate(pGuild->pParentSi, true);
+ db_delete_contact(pGuild->pParentSi->hContact);
pGuild->pParentSi = nullptr;
arGuilds.remove(pGuild);
diff --git a/protocols/Facebook/src/groupchats.cpp b/protocols/Facebook/src/groupchats.cpp index cc56860e5a..3717d65eef 100644 --- a/protocols/Facebook/src/groupchats.cpp +++ b/protocols/Facebook/src/groupchats.cpp @@ -245,7 +245,7 @@ int FacebookProto::Chat_KickUser(SESSION_INFO *si, const wchar_t *pwszUid) static void __cdecl DestroyRoomThread(SESSION_INFO *si)
{
::Sleep(100);
- Chat_Terminate(si, true);
+ db_delete_contact(si->hContact);
}
void FacebookProto::Chat_Leave(SESSION_INFO *si)
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index 08e31d7e23..71c5726c0b 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -1221,7 +1221,7 @@ void GaduProto::OnContactDeleted(MCONTACT hContact) list_remove(&chats, chat, 1);
// Terminate chat window / shouldn't cascade entry is deleted
Chat_Control(chat->si, SESSION_OFFLINE);
- Chat_Terminate(chat->si, wszRoomId);
+ Chat_Terminate(chat->si);
chat->si = nullptr;
}
return;
diff --git a/protocols/ICQ-WIM/src/groupchats.cpp b/protocols/ICQ-WIM/src/groupchats.cpp index d59e7c6a74..42c1b21c64 100644 --- a/protocols/ICQ-WIM/src/groupchats.cpp +++ b/protocols/ICQ-WIM/src/groupchats.cpp @@ -160,7 +160,7 @@ void CIcqProto::LeaveDestroyChat(SESSION_INFO *si) Push(new AsyncHttpRequest(CONN_MAIN, REQUEST_GET, ICQ_API_SERVER "/buddylist/hideChat")
<< AIMSID(this) << WCHAR_PARAM("buddy", si->ptszID) << INT64_PARAM("lastMsgId", getId(si->hContact, DB_KEY_LASTMSGID)));
- Chat_Terminate(si, true);
+ db_delete_contact(si->hContact);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index f4c9dd1353..48a5a98d8b 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -641,7 +641,7 @@ void CVkProto::LeaveChat(int chat_id, bool close_window, bool delete_chat) return;
if (close_window)
- Chat_Terminate(m_szModuleName, cc->m_si->ptszID);
+ Chat_Terminate(cc->m_si);
else
Chat_Control(cc->m_si, SESSION_OFFLINE);
|