summaryrefslogtreecommitdiff
path: root/protocols/Discord
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Discord')
-rw-r--r--protocols/Discord/src/proto.cpp5
-rw-r--r--protocols/Discord/src/proto.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp
index 423242c338..7e55ea5d65 100644
--- a/protocols/Discord/src/proto.cpp
+++ b/protocols/Discord/src/proto.cpp
@@ -625,17 +625,18 @@ int CDiscordProto::OnAccountChanged(WPARAM iAction, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
-void CDiscordProto::OnContactDeleted(MCONTACT hContact)
+bool CDiscordProto::OnContactDeleted(MCONTACT hContact)
{
CDiscordUser *pUser = FindUser(getId(hContact, DB_KEY_ID));
if (pUser == nullptr || !m_bOnline)
- return;
+ return false;
if (pUser->channelId)
Push(new AsyncHttpRequest(this, REQUEST_DELETE, CMStringA(FORMAT, "/channels/%lld", pUser->channelId), nullptr));
if (pUser->id)
RemoveFriend(pUser->id);
+ return true;
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/Discord/src/proto.h b/protocols/Discord/src/proto.h
index 6e62cb0d5a..d6aa55c990 100644
--- a/protocols/Discord/src/proto.h
+++ b/protocols/Discord/src/proto.h
@@ -377,7 +377,7 @@ public:
int SetStatus(int iNewStatus) override;
void OnBuildProtoMenu() override;
- void OnContactDeleted(MCONTACT) override;
+ bool OnContactDeleted(MCONTACT) override;
MWindow OnCreateAccMgrUI(MWindow) override;
void OnMarkRead(MCONTACT, MEVENT) override;
void OnModulesLoaded() override;