diff options
author | George Hazan <george.hazan@gmail.com> | 2024-01-27 20:23:20 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-01-27 20:23:20 +0300 |
commit | d18fdf58c517c957809e9ec0b8044a05984de7c6 (patch) | |
tree | 795967aee27142f012f47e739b1bbb31c53b7450 /protocols/ICQ-WIM | |
parent | abc610a264a0a9c03effe579283c7d4c4fdf08b5 (diff) |
fixes #4140 (NewStory: удаление отдельных сообщений)
Diffstat (limited to 'protocols/ICQ-WIM')
-rw-r--r-- | protocols/ICQ-WIM/src/proto.cpp | 5 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/proto.h | 2 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 2 |
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);
}
}
}
|