Skip to content

Commit

Permalink
Merge pull request #25 from ValdikSS/otr-nocopy-hints
Browse files Browse the repository at this point in the history
Add processing hints and disable carbons for OTR messages.
  • Loading branch information
tehnick committed Oct 4, 2017
2 parents 8af8e9e + bb2e589 commit ffd5838
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions generic/otrplugin/src/psiotrplugin.cpp
Expand Up @@ -563,6 +563,18 @@ bool PsiOtrPlugin::outgoingStanza(int accountIndex, QDomElement& xml)
xml.removeChild(htmlElement);
}

if (xml.attribute("to").contains("/")) {
// if not a bare jid
htmlElement = xml.ownerDocument().createElementNS("urn:xmpp:hints" ,"no-copy");
xml.appendChild(htmlElement);
}

htmlElement = xml.ownerDocument().createElementNS("urn:xmpp:hints", "no-permanent-store");
xml.appendChild(htmlElement);

htmlElement = xml.ownerDocument().createElementNS("urn:xmpp:carbons:2", "private");
xml.appendChild(htmlElement);

return false;
}

Expand Down

0 comments on commit ffd5838

Please sign in to comment.