XMPP’s <message> stanzas are a “push” mechanism to send information to other XMPP entities without requiring a response.
Chat clients will typically use <message> stanzas that have a type of either “chat” or “groupchat”.
When handling a message event, be sure to check if the message is an error response.
</message>
</message>
Set the message type to ‘chat’.
Dummy method to prevent deletion.
Dummy method to prevent deletion.
Dummy method to prevent deletion.
Dummy method to prevent deletion.
Delete the message thread’s parent reference.
Return the nickname of the MUC user that sent the message.
Read-only stanza interface.
Return the name of the MUC room where the message originated.
Read-only stanza interface.
Return the message type.
Overrides default stanza interface behavior.
Returns ‘normal’ if no type attribute is present.
Return the nickname of the MUC user that sent the message.
Read-only stanza interface.
Return the name of the MUC room where the message originated.
Read-only stanza interface.
Return the message thread’s parent thread.
Return the message type.
Overrides default stanza interface behavior.
Returns ‘normal’ if no type attribute is present.
Set the message type to ‘normal’.
Create a message reply.
Overrides StanzaBase.reply.
Sets proper ‘to’ attribute if the message is from a MUC, and adds a message body if one is given.
body – Optional text content for the message. clear – Indicates if existing content should be removed
before replying. Defaults to True.
Dummy method to prevent modification.
Dummy method to prevent modification.
Dummy method to prevent modification.
Dummy method to prevent modification.
Add or change the message thread’s parent thread.
XMPP’s <presence> stanza allows entities to know the status of other clients and components. Since it is currently the only multi-cast stanza in XMPP, many extensions add more information to <presence> stanzas to broadcast to every entry in the roster, such as capabilities, music choices, or locations (XEP-0115: Entity Capabilities and XEP-0163: Personal Eventing Protocol).
Since <presence> stanzas are broadcast when an XMPP entity changes its status, the bulk of the traffic in an XMPP network will be from <presence> stanzas. Therefore, do not include more information than necessary in a status message or within a <presence> stanza in order to help keep the network running smoothly.
<presence />
</presence>
<presence type=”unavailable” />
<presence to=”user@otherhost.com” type=”subscribe” />
showtypes – One of: away, chat, dnd, and xa.
Return the value of the <presence> stanza’s type attribute, or the value of the <show> element.
Remove both the type attribute and the <show> element.
Override exception passback for presence.
Return the value of the <presence> element as an integer.
Return the value of the <presence> stanza’s type attribute, or the value of the <show> element.
Return the value of the <presence> element as an integer.
Return the value of the <presence> stanza’s type attribute, or the value of the <show> element.
Set the appropriate presence reply type.
Overrides StanzaBase.reply.
Set the entity’s priority value. Some server use priority to determine message routing behavior.
Bot clients should typically use a priority of 0 if the same JID is used elsewhere by a human-interacting client.
Set the value of the <show> element.
Set the type attribute’s value, and the <show> element if applicable.
Set the entity’s priority value. Some server use priority to determine message routing behavior.
Bot clients should typically use a priority of 0 if the same JID is used elsewhere by a human-interacting client.
Set the value of the <show> element.
Set the type attribute’s value, and the <show> element if applicable.
XMPP <iq> stanzas, or info/query stanzas, are XMPP’s method of requesting and modifying information, similar to HTTP’s GET and POST methods.
Each <iq> stanza must have an ‘id’ value which associates the stanza with the response stanza. XMPP entities must always be given a response <iq> stanza with a type of ‘result’ after sending a stanza of type ‘get’ or ‘set’.
Most uses cases for <iq> stanzas will involve adding a <query> element whose namespace indicates the type of information desired. However, some custom XMPP applications use <iq> stanzas as a carrier stanza for an application-specific protocol instead.
</iq>
name=’John Doe’ subscription=’both’>
<group>Friends</group>
</item>
</query>
</iq>
Remove the <query> element.
Remove the <query> element.
Return the namespace of the <query> element.
Return the namespace of the <query> element.
Send a reply <iq> stanza.
Overrides StanzaBase.reply
Sets the ‘type’ to ‘result’ in addition to the default StanzaBase.reply behavior.
Send an <iq> stanza over the XML stream.
The send call can optionally block until a response is received or a timeout occurs. Be aware that using blocking in non-threaded event handlers can drastically impact performance. Otherwise, a callback handler can be provided that will be executed when the Iq stanza’s result reply is received. Be aware though that that the callback handler will not be executed in its own thread.
Using both block and callback is not recommended, and only the callback argument will be used in that case.
Overrides StanzaBase.send
Set the XML contents of the <iq> stanza.
Add or modify a <query> element.
Query elements are differentiated by their namespace.
Set the XML contents of the <iq> stanza.
Add or modify a <query> element.
Query elements are differentiated by their namespace.
Send a feature-not-implemented error if the stanza is not handled.
Overrides StanzaBase.unhandled.