diff options
author | George Hazan <george.hazan@gmail.com> | 2024-05-18 14:38:28 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-05-18 14:38:28 +0300 |
commit | caab4c9286515b99ed1834f61b9b18952b782746 (patch) | |
tree | 067265a5733760fb5a9fbbd238bfc07b66eea37c | |
parent | 3e4f071ec536c6a19c22779ca46d4a3e194247ed (diff) |
Discord: fix for message editing
-rw-r--r-- | protocols/Discord/src/dispatch.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp index 794ee73275..0abc80d607 100644 --- a/protocols/Discord/src/dispatch.cpp +++ b/protocols/Discord/src/dispatch.cpp @@ -501,12 +501,6 @@ void CDiscordProto::OnCommandMessage(const JSONNode &pRoot, bool bIsNew) if (bOurMessage)
dbei.flags |= DBEF_READ | DBEF_SENT;
- if (dbei) {
- ptrW wszOldText(dbei.getText());
- if (wszOldText)
- wszText.Insert(0, wszOldText);
- }
-
if (auto &nReply = pRoot["message_reference"]) {
_i64toa(::getId(nReply["message_id"]), szReplyId, 10);
dbei.szReplyId = szReplyId;
@@ -517,6 +511,7 @@ void CDiscordProto::OnCommandMessage(const JSONNode &pRoot, bool bIsNew) dbei.timestamp = (uint32_t)StringToDate(pRoot["timestamp"].as_mstring());
dbei.szId = szMsgId;
replaceStr(dbei.pBlob, mir_utf8encodeW(wszText));
+ dbei.cbBlob = (int)mir_strlen(dbei.pBlob);
if (!pUser->bIsPrivate || pUser->bIsGroup) {
dbei.szUserId = szUserId;
|