From dbc48cc0ec4df774c257d5175d62bce16e2437e3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 9 Dec 2023 20:00:47 +0300 Subject: PROTO_INTERFACE::OnContactDeleted to be able to block the contact's deletion --- protocols/Twitter/src/contacts.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'protocols/Twitter/src/contacts.cpp') 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) -- cgit v1.2.3