Converse converse.js

Module: converse-emoji

License:
  • Mozilla Public License (MPLv2)
Source:

Methods

(inner) parseMUCPresence(stanza, chatbox) → {MUCPresenceAttributes}

Parses a passed in MUC presence stanza and returns an object of attributes.

Parameters:
Name Type Description
stanza Element

The presence stanza

chatbox _converse.ChatRoom
Source:
Returns:
Type
MUCPresenceAttributes

Type Definitions

MUCHat

Object representing a XEP-0371 Hat

Type:
  • Object
Properties:
Name Type Description
title String
uri String
Source:

MUCMessageAttributes

The object which parseMUCMessage returns

Type:
  • Object
Properties:
Name Type Description
sender 'me' | 'them'

Whether the message was sent by the current user or someone else

activities Array.<Object>

A list of objects representing XEP-0316 MEP notification data

references Array.<Object>

A list of objects representing XEP-0372 references

editable Boolean

Is this message editable via XEP-0308?

is_archived Boolean

Is this message from a XEP-0313 MAM archive?

is_carbon Boolean

Is this message a XEP-0280 Carbon?

is_delayed Boolean

Was delivery of this message was delayed as per XEP-0203?

is_encrypted Boolean

Is this message XEP-0384 encrypted?

is_error Boolean

Whether an error was received for this message

is_headline Boolean

Is this a "headline" message?

is_markable Boolean

Can this message be marked with a XEP-0333 chat marker?

is_marker Boolean

Is this message a XEP-0333 Chat Marker?

is_only_emojis Boolean

Does the message body contain only emojis?

is_spoiler Boolean

Is this a XEP-0382 spoiler message?

is_tombstone Boolean

Is this a XEP-0424 tombstone?

is_unstyled Boolean

Whether XEP-0393 styling hints should be ignored

is_valid_receipt_request Boolean

Does this message request a XEP-0184 receipt (and is not from us or a carbon or archived message)

encrypted Object

XEP-0384 encryption payload attributes

body String

The contents of the tag of the message stanza

chat_state String

The XEP-0085 chat state notification contained in this message

edited String

An ISO8601 string recording the time that the message was edited per XEP-0308

error_condition String

The defined error condition

error_text String

The error text received from the server

error_type String

The type of error received from the server

from String

The sender JID (${muc_jid}/${nick})

from_muc String

The JID of the MUC from which this message was sent

from_real_jid String

The real JID of the sender, if available

fullname String

The full name of the sender

marker String

The XEP-0333 Chat Marker value

marker_id String

The id attribute of a XEP-0333 chat marker

moderated String

The type of XEP-0425 moderation (if any) that was applied

moderated_by String

The JID of the user that moderated this message

moderated_id String

The XEP-0359 Stanza ID of the message that this one moderates

moderation_reason String

The reason provided why this message moderates another

msgid String

The root id attribute of the stanza

nick String

The MUC nickname of the sender

occupant_id String

The XEP-0421 occupant ID

oob_desc String

The description of the XEP-0066 out of band data

oob_url String

The URL of the XEP-0066 out of band data

origin_id String

The XEP-0359 Origin ID

receipt_id String

The id attribute of a XEP-0184 element

received String

An ISO8601 string recording the time that the message was received

replace_id String

The id attribute of a XEP-0308 element

retracted String

An ISO8601 string recording the time that the message was retracted

retracted_id String

The id attribute of a XEP-424 element

spoiler_hint String

The XEP-0382 spoiler hint

stanza_id String

The XEP-0359 Stanza ID. Note: the key is actualy stanza_id ${by_jid} and there can be multiple.

subject String

The element value

thread String

The element value

time String

The time (in ISO8601 format), either given by the XEP-0203 element, or of receipt.

to String

The recipient JID

type String

The type of message

Source:

MUCMessageData

An object containing the parsed MUCMessageAttributes and current ChatRoom.

Type:
  • Object
Properties:
Name Type Description
attrs MUCMessageAttributes
chatbox ChatRoom
Source:

MUCPresenceAttributes

The object which parseMUCPresence returns

Type:
  • Object
Properties:
Name Type Description
show "offline|online"
hats Array.<MUCHat>

An array of XEP-0317 hats

states Array.<string>
from String

The sender JID (${muc_jid}/${nick})

nick String

The nickname of the sender

occupant_id String

The XEP-0421 occupant ID

type String

The type of presence

Source:

MemberListItem

Either the JID or the nickname (or both) will be available.

Type:
  • Object
Properties:
Name Type Attributes Description
affiliation string
role string <optional>
jid string <optional>
nick string <optional>
Source:

OccupantData

Type:
  • Object
Properties:
Name Type Attributes Description
jid String <optional>
nick String <optional>
occupant_id String <optional>

The XEP-0421 unique occupant id

Source:
License:
  • Mozilla Public License (MPLv2)
Source:

Methods

(inner) parseMUCPresence(stanza, chatbox) → {MUCPresenceAttributes}

Parses a passed in MUC presence stanza and returns an object of attributes.

Parameters:
Name Type Description
stanza Element

The presence stanza

chatbox _converse.ChatRoom
Source:
Returns:
Type
MUCPresenceAttributes

Type Definitions

MUCHat

Object representing a XEP-0371 Hat

Type:
  • Object
Properties:
Name Type Description
title String
uri String
Source:

MUCMessageAttributes

The object which parseMUCMessage returns

Type:
  • Object
Properties:
Name Type Description
sender 'me' | 'them'

Whether the message was sent by the current user or someone else

activities Array.<Object>

A list of objects representing XEP-0316 MEP notification data

references Array.<Object>

A list of objects representing XEP-0372 references

editable Boolean

Is this message editable via XEP-0308?

is_archived Boolean

Is this message from a XEP-0313 MAM archive?

is_carbon Boolean

Is this message a XEP-0280 Carbon?

is_delayed Boolean

Was delivery of this message was delayed as per XEP-0203?

is_encrypted Boolean

Is this message XEP-0384 encrypted?

is_error Boolean

Whether an error was received for this message

is_headline Boolean

Is this a "headline" message?

is_markable Boolean

Can this message be marked with a XEP-0333 chat marker?

is_marker Boolean

Is this message a XEP-0333 Chat Marker?

is_only_emojis Boolean

Does the message body contain only emojis?

is_spoiler Boolean

Is this a XEP-0382 spoiler message?

is_tombstone Boolean

Is this a XEP-0424 tombstone?

is_unstyled Boolean

Whether XEP-0393 styling hints should be ignored

is_valid_receipt_request Boolean

Does this message request a XEP-0184 receipt (and is not from us or a carbon or archived message)

encrypted Object

XEP-0384 encryption payload attributes

body String

The contents of the tag of the message stanza

chat_state String

The XEP-0085 chat state notification contained in this message

edited String

An ISO8601 string recording the time that the message was edited per XEP-0308

error_condition String

The defined error condition

error_text String

The error text received from the server

error_type String

The type of error received from the server

from String

The sender JID (${muc_jid}/${nick})

from_muc String

The JID of the MUC from which this message was sent

from_real_jid String

The real JID of the sender, if available

fullname String

The full name of the sender

marker String

The XEP-0333 Chat Marker value

marker_id String

The id attribute of a XEP-0333 chat marker

moderated String

The type of XEP-0425 moderation (if any) that was applied

moderated_by String

The JID of the user that moderated this message

moderated_id String

The XEP-0359 Stanza ID of the message that this one moderates

moderation_reason String

The reason provided why this message moderates another

msgid String

The root id attribute of the stanza

nick String

The MUC nickname of the sender

occupant_id String

The XEP-0421 occupant ID

oob_desc String

The description of the XEP-0066 out of band data

oob_url String

The URL of the XEP-0066 out of band data

origin_id String

The XEP-0359 Origin ID

receipt_id String

The id attribute of a XEP-0184 element

received String

An ISO8601 string recording the time that the message was received

replace_id String

The id attribute of a XEP-0308 element

retracted String

An ISO8601 string recording the time that the message was retracted

retracted_id String

The id attribute of a XEP-424 element

spoiler_hint String

The XEP-0382 spoiler hint

stanza_id String

The XEP-0359 Stanza ID. Note: the key is actualy stanza_id ${by_jid} and there can be multiple.

subject String

The element value

thread String

The element value

time String

The time (in ISO8601 format), either given by the XEP-0203 element, or of receipt.

to String

The recipient JID

type String

The type of message

Source:

MUCMessageData

An object containing the parsed MUCMessageAttributes and current ChatRoom.

Type:
  • Object
Properties:
Name Type Description
attrs MUCMessageAttributes
chatbox ChatRoom
Source:

MUCPresenceAttributes

The object which parseMUCPresence returns

Type:
  • Object
Properties:
Name Type Description
show "offline|online"
hats Array.<MUCHat>

An array of XEP-0317 hats

states Array.<string>
from String

The sender JID (${muc_jid}/${nick})

nick String

The nickname of the sender

occupant_id String

The XEP-0421 occupant ID

type String

The type of presence

Source:

MemberListItem

Either the JID or the nickname (or both) will be available.

Type:
  • Object
Properties:
Name Type Attributes Description
affiliation string
role string <optional>
jid string <optional>
nick string <optional>
Source:

OccupantData

Type:
  • Object
Properties:
Name Type Attributes Description
jid String <optional>
nick String <optional>
occupant_id String <optional>

The XEP-0421 unique occupant id

Source: