The stanza utils object. Contains utility functions related to stanza processing.
- Source:
Methods
getAttributes(stanza) → {Object}
Returns an object containing all attribute names and values for a particular element.
Parameters:
Name | Type | Description |
---|---|---|
stanza |
XMLElement |
- Source:
Returns:
- Type
- Object
(private) getChatMarker(stanza) → {Boolean}
Determines whether the passed in stanza is a XEP-0333 Chat Marker
Parameters:
Name | Type | Description |
---|---|---|
stanza |
XMLElement | The message stanza |
- Source:
Returns:
- Type
- Boolean
(private) isArchived(stanza) → {Boolean}
Determines whether the passed in stanza is a XEP-0313 MAM stanza
Parameters:
Name | Type | Description |
---|---|---|
stanza |
XMLElement | The message stanza |
- Source:
Returns:
- Type
- Boolean
parseMessage(stanza, _converse) → {MessageAttributes|Error}
Parses a passed in message stanza and returns an object of attributes.
Parameters:
Name | Type | Description |
---|---|---|
stanza |
XMLElement | The message stanza |
_converse |
_converse |
- Source:
Returns:
- Type
- MessageAttributes | Error
parseMUCMessage(stanza, original_stanza, chatbox, _converse) → {Promise.<(MUCMessageAttributes|Error)>}
Parses a passed in message stanza and returns an object of attributes.
Parameters:
Name | Type | Description |
---|---|---|
stanza |
XMLElement | The message stanza |
original_stanza |
XMLElement | The original stanza, that contains the message stanza, if it was contained, otherwise it's the message stanza itself. |
chatbox |
_converse.ChatRoom | |
_converse |
_converse |
- Source:
Returns:
- Type
- Promise.<(MUCMessageAttributes|Error)>
parseMUCPresence(stanza) → {Object}
Parses a passed in MUC presence stanza and returns an object of attributes.
Parameters:
Name | Type | Description |
---|---|---|
stanza |
XMLElement | The presence stanza |
- Source:
Returns:
- Type
- Object