QXmppMessageRetraction Class
The QXmppMessageRetraction class represents a message retraction as defined by XEP-0424: Message Retraction. More...
| Header: | #include <QXmppMessageRetraction.h> |
| Since: | QXmpp 1.17 |
- List of all members, including inherited members
- QXmppMessageRetraction is part of Stanzas.
Public Functions
| QXmppMessageRetraction() | |
| QXmppMessageRetraction(QString retractedId) | |
| const std::optional<QXmppMessageModeration> & | moderation() const |
| QString | retractedId() const |
| void | setModeration(const std::optional<QXmppMessageModeration> &moderation) |
| void | setRetractedId(const QString &id) |
Detailed Description
Indicates that a previously sent message should be removed. The retracted message is referenced by its id: the XEP-0359: Unique and Stable Stanza IDs origin id in 1:1 chats, or the stanza id assigned by the room in group chats.
If the retraction was performed by a XEP-0045: Multi-User Chat moderator (XEP-0425: Moderated Message Retraction), moderation() carries information about the moderator and the reason.
When sending a retraction, you are responsible for adding a XEP-0428: Fallback Indication marker, a human-readable fallback body and the XEP-0334: Message Processing Hints store hint (see QXmppMessage::setFallbackMarkers() and QXmppMessage::Store).
Member Function Documentation
[constexpr noexcept default] QXmppMessageRetraction::QXmppMessageRetraction()
Default-constructs an instance of QXmppMessageRetraction.
[explicit] QXmppMessageRetraction::QXmppMessageRetraction(QString retractedId)
Constructs a message retraction referencing the message with the given retractedId.
const std::optional<QXmppMessageModeration> &QXmppMessageRetraction::moderation() const
Returns the moderation information, set only for XEP-0425: Moderated Message Retraction retractions.
See also setModeration().
QString QXmppMessageRetraction::retractedId() const
Returns the id of the message being retracted (origin id in 1:1 chats, stanza id in MUCs).
See also setRetractedId().
void QXmppMessageRetraction::setModeration(const std::optional<QXmppMessageModeration> &moderation)
Sets the moderation information for a XEP-0425: Moderated Message Retraction retraction.
See also moderation().
void QXmppMessageRetraction::setRetractedId(const QString &id)
Sets the id of the message being retracted (origin id in 1:1 chats, stanza id in MUCs).
See also retractedId().