pontarius-xmpp-0.1.0.2: An incomplete implementation of RFC 6120 (XMPP: Core)

Safe HaskellNone

Network.Xmpp.IM.Message

Synopsis

Documentation

subject :: Message -> [MessageSubject]Source

Get the subject elements of a message (if any). Messages may contain multiple subjects if each of them has a distinct xml:lang attribute

thread :: Message -> Maybe MessageThreadSource

Get the thread elements of a message (if any). The thread of a message is considered opaque, that is, no meaning, other than it's literal identity, may be derived from it and it is not human readable

body :: Message -> [MessageBody]Source

Get the body elements of a message (if any). Messages may contain multiple bodies if each of them has a distinct xml:lang attribute

newIM :: Jid -> Maybe StanzaId -> Maybe LangTag -> MessageType -> Maybe MessageSubject -> Maybe MessageThread -> Maybe MessageBody -> [Element] -> MessageSource

Generate a new instant message

simpleIM :: Jid -> Text -> MessageSource

Generate a simple instance message

answerIM :: Maybe MessageBody -> [Element] -> Message -> MessageSource

Generate an answer from a received message. The recepient is taken from the original sender, the sender is set to Nothing, message ID, language tag, message type as well as subject and thread are inherited, the remaining payload is replaced by the given one