class XMPP::Stanza::Message

Overview

Message Packet Message implements RFC 6120 - A.5 Client Namespace (a part) RFC 3921 Section 2.1 - Message Syntax

Exchanging messages is a basic use of XMPP and occurs when a user generates a message stanza that is addressed to another entity. The sender's server is responsible for delivering the message to the intended recipient (if the recipient is on the same local server) or for routing the message to the recipient's server (if the recipient is on a remote server). Thus a message stanza is used to "push" information to another entity.

"Subject" Element

The #subject element contains human-readable XML character data that specifies the topic of the message.

"Body" Element

The #body element contains human-readable XML character data that specifies the textual contents of the message; this child element is normally included but is optional.

"Thread" Element

The primary use of the XMPP #thread element is to uniquely identify a conversation thread or "chat session" between two entities instantiated by Message stanzas of type chat. However, the XMPP thread element can also be used to uniquely identify an analogous thread between two entities instantiated by Message stanzas of type headline or normal, or among multiple entities in the context of a multi-user chat room instantiated by Message stanzas of type groupchat. It MAY also be used for Message stanzas not related to a human conversation, such as a game session or an interaction between plugins. The #thread element is not used to identify individual messages, only conversations or messagingg sessions. The inclusion of the #thread element is optional.

The value of the #thread element is not human-readable and MUST be treated as opaque by entities; no semantic meaning can be derived from it, and only exact comparisons can be made against it. The value of the #thread element MUST be a universally unique identifier (UUID) as described in [UUID].

The #thread element MAY possess a 'parent' attribute that identifies another thread of which the current thread is an offshoot or child; the value of the 'parent' must conform to the syntax of the #thread element itself.

Included Modules

Defined in:

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module XMPP::Stanza::Attrs

attr_hash attr_hash, from : String from, from=(from : String) from=, id : String id, id=(id : String) id=, lang : String lang, lang=(lang : String) lang=, load_attrs(node : XML::Node) load_attrs, to : String to, to=(to : String) to=, type : String type, type=(type : String) type=, xmlns : String xmlns

Instance methods inherited from module XMPP::Stanza::Packet

name : String name, to_xml(xml : XML::Builder)
to_xml : String
to_xml

Instance methods inherited from module XMPP::Stanza::Packet

name : String name, to_xml(xml : XML::Builder)
to_xml : String
to_xml

Constructor Detail

def self.new(xml : String) #

def self.new(node : XML::Node) #

Class Method Detail

def self.xml_name : String #

Instance Method Detail

def body : String #

def body=(body : String) #

def error : Error? #

def error=(error : Error?) #

def extensions : Array(Extension) #

def extensions=(extensions : Array(Extension)) #

def get(type : MsgExtension.class) #

get search and extracts a specific extension on a message. it will return extension instance if found on message else return nil


def name : String #

def subject : String #

def subject=(subject : String) #

def thread : String #

def thread=(thread : String) #

def to_xml(elem : XML::Builder) #

def xmpp_format #