summaryrefslogtreecommitdiff
path: root/protocols/Twitter/src/contacts.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-12-09 20:00:47 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-12-09 20:00:47 +0300
commitdbc48cc0ec4df774c257d5175d62bce16e2437e3 (patch)
tree525937d7b3e549bb75a817571dcecc0f7e32f82d /protocols/Twitter/src/contacts.cpp
parent4d29366657d2ee93db4913a5a07af0d26820c058 (diff)
PROTO_INTERFACE::OnContactDeleted to be able to block the contact's deletion
Diffstat (limited to 'protocols/Twitter/src/contacts.cpp')
-rw-r--r--protocols/Twitter/src/contacts.cpp5
1 files changed, 3 insertions, 2 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)