diff options
author | George Hazan <ghazan@miranda.im> | 2020-06-21 17:23:35 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-06-21 17:23:35 +0300 |
commit | 3affb5c66976bda2e61a0f4206ccc0b1fb2e9283 (patch) | |
tree | 8f099e8a086d1373bd36c3ba2458fcec567542f7 | |
parent | 255f0d345e867385d969fe13cbce32c00a4abe1f (diff) |
Jabber: cause MAM doesn't set ids for outgoing messages, our own messages (with the same resource) shall be ignored
-rwxr-xr-x | protocols/JabberG/src/jabber_thread.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 57b3727c90..c4b6c54956 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -1086,8 +1086,7 @@ void CJabberProto::OnProcessMessage(const TiXmlElement *node, ThreadData *info) if (IsMyOwnJID(from)) {
carbon = XmlGetChildByTag(node, "received", "xmlns", JABBER_FEAT_CARBONS);
if (!carbon) {
- carbon = XmlGetChildByTag(node, "sent", "xmlns", JABBER_FEAT_CARBONS);
- if (carbon)
+ if (carbon = XmlGetChildByTag(node, "sent", "xmlns", JABBER_FEAT_CARBONS))
carbonSent = true;
}
if (carbon) {
@@ -1133,6 +1132,10 @@ void CJabberProto::OnProcessMessage(const TiXmlElement *node, ThreadData *info) node = xmlMessage;
type = XmlGetAttr(node, "type");
from = XmlGetAttr(node, "from");
+ if (!mir_strcmpi(from, info->fullJID)) {
+ debugLogA("MAM: outgoing message from this machine (%s), ignored", from);
+ return;
+ }
}
if (auto *xmlDelay = XmlGetChildByTag(xmlForwarded, "delay", "xmlns", JABBER_FEAT_DELAY)) {
if (auto *ptszTimeStamp = XmlGetAttr(xmlDelay, "stamp"))
|