QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
QXmppMessageReaction Class Reference

The QXmppMessageReaction class represents a reaction to a message in the form of emojis as specified by XEP-0444: Message Reactions. More...

Public Member Functions

 QXmppMessageReaction ()
 
QString messageId () const
 
void setMessageId (const QString &messageId)
 
QVector< QString > emojis () const
 
void setEmojis (const QVector< QString > &emojis)
 

Static Public Member Functions

static bool isMessageReaction (const QDomElement &element)
 

Detailed Description

The QXmppMessageReaction class represents a reaction to a message in the form of emojis as specified by XEP-0444: Message Reactions.

Since
QXmpp 1.5

Constructor & Destructor Documentation

◆ QXmppMessageReaction()

QXmppMessageReaction::QXmppMessageReaction ( )

Constructs a message reaction.

Member Function Documentation

◆ emojis()

QVector< QString > QXmppMessageReaction::emojis ( ) const

Returns the emojis in reaction to a message.

Returns
the emoji reactions

◆ isMessageReaction()

bool QXmppMessageReaction::isMessageReaction ( const QDomElement &  element)
static

Determines whether the given DOM element is a message reaction element.

Parameters
elementDOM element being checked
Returns
true if element is a message reaction element, otherwise false

◆ messageId()

QString QXmppMessageReaction::messageId ( ) const

Returns the ID of the message for that the reaction is sent.

For a group chat message,

QString stanzaId() const
Definition QXmppMessage.cpp:880

is used.

For other message types,

QString originId() const
Definition QXmppMessage.cpp:924

is used. If that is not available,

QString id() const
Definition QXmppStanza.cpp:866

is used.

Returns
the message's ID

◆ setEmojis()

void QXmppMessageReaction::setEmojis ( const QVector< QString > &  emojis)

Sets the emojis in reaction to a message.

Each reaction should only consist of unicode codepoints that can be displayed as a single emoji. Duplicates are not allowed.

Parameters
emojisemoji reactions

◆ setMessageId()

void QXmppMessageReaction::setMessageId ( const QString &  messageId)

Sets the ID of the message for that the reaction is sent.

For a group chat message,

must be used. If there is no such ID, a message reaction must not be sent.

For other message types,

should be used. If that is not available,

should be used.

Parameters
messageIdmessage's ID

The documentation for this class was generated from the following files: