You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.
Lance Stout edited this page Oct 25, 2010
·
5 revisions
Stanzas: Message
Creating a Message Stanza:
msg=sleekxmpp.Message()
msg['type'] # can be "", "normal", "chat", "headline", "error", "groupchat"msg['to'] # can be JID or any combination of "usernode@serverdomain/resource"msg['from'] # same as tomsg['id'] # any stringmsg['body'] # any string (the plain text message body)msg['subject'] # any stringmsg['mucroom'] # return only object that returns the room if type is groupchat # -- same as msg['from'].baremsg['mucnick'] # return only object that returns the nickname of the user # who sent the message if type is groupchat# -- same as msg['from'].resource
msg['html']['body'] can be cElementTree Element. Will wrap in
{http://www.w3.org/1999/xhtml}body for you if you don't include it. Returns
{http://www.w3.org/1999/xhtml}body Element w/ children.