Safe Haskell | None |
---|
- data MessageBody = MessageBody (Maybe LangTag) Text
- data MessageThread = MessageThread Text (Maybe Text)
- data MessageSubject = MessageSubject (Maybe LangTag) Text
- xpMessageSubject :: PU [Element] MessageSubject
- xpMessageBody :: PU [Element] MessageBody
- xpMessageThread :: PU [Element] MessageThread
- subject :: Message -> [MessageSubject]
- thread :: Message -> Maybe MessageThread
- body :: Message -> [MessageBody]
- newIM :: Jid -> Maybe StanzaId -> Maybe LangTag -> MessageType -> Maybe MessageSubject -> Maybe MessageThread -> Maybe MessageBody -> [Element] -> Message
- simpleIM :: Jid -> Text -> Message
- answerIM :: Maybe MessageBody -> [Element] -> Message -> Message
Documentation
data MessageBody Source
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
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