summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-01-27 20:23:20 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-01-27 20:23:20 +0300
commitd18fdf58c517c957809e9ec0b8044a05984de7c6 (patch)
tree795967aee27142f012f47e739b1bbb31c53b7450 /protocols/ICQ-WIM
parentabc610a264a0a9c03effe579283c7d4c4fdf08b5 (diff)
fixes #4140 (NewStory: удаление отдельных сообщений)
Diffstat (limited to 'protocols/ICQ-WIM')
-rw-r--r--protocols/ICQ-WIM/src/proto.cpp5
-rw-r--r--protocols/ICQ-WIM/src/proto.h2
-rw-r--r--protocols/ICQ-WIM/src/server.cpp2
3 files changed, 6 insertions, 3 deletions
diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp
index 48f94f5714..ac144f2cdf 100644
--- a/protocols/ICQ-WIM/src/proto.cpp
+++ b/protocols/ICQ-WIM/src/proto.cpp
@@ -226,8 +226,11 @@ void CIcqProto::BatchDeleteMsg()
m_hDeleteContact = INVALID_CONTACT_ID;
}
-void CIcqProto::OnEventDeleted(MCONTACT hContact, MEVENT hEvent)
+void CIcqProto::OnEventDeleted(MCONTACT hContact, MEVENT hEvent, int flags)
{
+ if (!(flags & CDF_FROM_SERVER))
+ return;
+
if (m_hDeleteContact != INVALID_CONTACT_ID)
if (m_hDeleteContact != hContact)
BatchDeleteMsg();
diff --git a/protocols/ICQ-WIM/src/proto.h b/protocols/ICQ-WIM/src/proto.h
index 7fe31a13e0..b7f05974ae 100644
--- a/protocols/ICQ-WIM/src/proto.h
+++ b/protocols/ICQ-WIM/src/proto.h
@@ -444,7 +444,7 @@ class CIcqProto : public PROTO<CIcqProto>
void OnContactAdded(MCONTACT) override;
bool OnContactDeleted(MCONTACT, uint32_t flags) override;
MWindow OnCreateAccMgrUI(MWindow) override;
- void OnEventDeleted(MCONTACT, MEVENT) override;
+ void OnEventDeleted(MCONTACT, MEVENT, int) override;
void OnEventEdited(MCONTACT, MEVENT, const DBEVENTINFO &dbei) override;
void OnMarkRead(MCONTACT, MEVENT) override;
void OnModulesLoaded() override;
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp
index cd024c1a08..10a7905f27 100644
--- a/protocols/ICQ-WIM/src/server.cpp
+++ b/protocols/ICQ-WIM/src/server.cpp
@@ -824,7 +824,7 @@ void CIcqProto::OnGetPatches(MHttpResponse *pReply, AsyncHttpRequest *pReq)
char msgId[100];
_i64toa(it.first, msgId, 10);
if (MEVENT hEvent = db_event_getById(m_szModuleName, msgId))
- db_event_delete(hEvent, true);
+ db_event_delete(hEvent, CDF_FROM_SERVER);
}
}
}