diff options
author | George Hazan <george.hazan@gmail.com> | 2023-12-09 20:00:47 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-12-09 20:00:47 +0300 |
commit | dbc48cc0ec4df774c257d5175d62bce16e2437e3 (patch) | |
tree | 525937d7b3e549bb75a817571dcecc0f7e32f82d /protocols/Twitter | |
parent | 4d29366657d2ee93db4913a5a07af0d26820c058 (diff) |
PROTO_INTERFACE::OnContactDeleted to be able to block the contact's deletion
Diffstat (limited to 'protocols/Twitter')
-rw-r--r-- | protocols/Twitter/src/contacts.cpp | 5 | ||||
-rw-r--r-- | protocols/Twitter/src/proto.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp index 09c8768582..3e019866ec 100644 --- a/protocols/Twitter/src/contacts.cpp +++ b/protocols/Twitter/src/contacts.cpp @@ -154,10 +154,10 @@ HANDLE CTwitterProto::GetAwayMsg(MCONTACT hContact) return (HANDLE)1;
}
-void CTwitterProto::OnContactDeleted(MCONTACT hContact)
+bool CTwitterProto::OnContactDeleted(MCONTACT hContact)
{
if (m_iStatus != ID_STATUS_ONLINE)
- return;
+ return false;
ptrA szId(getStringA(hContact, TWITTER_KEY_UN));
if (szId) {
@@ -167,6 +167,7 @@ void CTwitterProto::OnContactDeleted(MCONTACT hContact) mir_cslock s(twitter_lock_);
remove_friend(szId.get()); // Be careful about this until Miranda is fixed
}
+ return true;
}
void CTwitterProto::OnMarkRead(MCONTACT hContact, MEVENT hDbEvent)
diff --git a/protocols/Twitter/src/proto.h b/protocols/Twitter/src/proto.h index d75753d0b2..e3e5650b4d 100644 --- a/protocols/Twitter/src/proto.h +++ b/protocols/Twitter/src/proto.h @@ -183,7 +183,7 @@ public: HANDLE GetAwayMsg(MCONTACT) override;
- void OnContactDeleted(MCONTACT) override;
+ bool OnContactDeleted(MCONTACT) override;
MWindow OnCreateAccMgrUI(MWindow) override;
void OnMarkRead(MCONTACT, MEVENT) override;
void OnModulesLoaded() override;
|