From bb8780ecdbfe7eddb8280e696871e71b744d0bff Mon Sep 17 00:00:00 2001 From: Melvin Keskin Date: Sat, 28 Aug 2021 14:39:02 +0200 Subject: Add QXmppAtmManager --- src/base/QXmppMessage.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'src/base/QXmppMessage.cpp') diff --git a/src/base/QXmppMessage.cpp b/src/base/QXmppMessage.cpp index f975ae3c..e97731ae 100644 --- a/src/base/QXmppMessage.cpp +++ b/src/base/QXmppMessage.cpp @@ -108,6 +108,7 @@ public: QString thread; QString parentThread; QXmppMessage::Type type; + QString senderKey; // XEP-0066: Out of Band Data QString outOfBandUrl; @@ -324,6 +325,44 @@ void QXmppMessage::setParentThread(const QString &parent) d->parentThread = parent; } +/// +/// Returns the ID of this message's sender's public long-term key. +/// +/// The key ID is not part of a transmitted message and thus not de- / +/// serialized. +/// Instead, the key ID is set by an encryption protocol such as +/// \xep{0384, OMEMO Encryption} when it decrypts this message. +/// It can be used by trust management protocols such as +/// \xep{0450, Automatic Trust Management (ATM)}. +/// +/// \return the ID of the sender's key +/// +/// \since QXmpp 1.5 +/// +QString QXmppMessage::senderKey() const +{ + return d->senderKey; +} + +/// +/// Sets the ID of this message's sender's public long-term key. +/// +/// The key ID is not part of a transmitted message and thus not de- / +/// serialized. +/// Instead, the key ID is set by an encryption protocol such as +/// \xep{0384, OMEMO Encryption} when it decrypts this message. +/// It can be used by trust management protocols such as +/// \xep{0450, Automatic Trust Management (ATM)}. +/// +/// \param keyId ID of the sender's key +/// +/// \since QXmpp 1.5 +/// +void QXmppMessage::setSenderKey(const QString &keyId) +{ + d->senderKey = keyId; +} + /// /// Returns a possibly attached URL from \xep{0066}: Out of Band Data /// -- cgit v1.2.3