forked from sch/Blasta
77ac4c0ed9
Update document README.
22 lines
651 B
Python
22 lines
651 B
Python
#!/usr/bin/python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
class XmppMessage:
|
|
|
|
def send(self, jid, message_body):
|
|
jid_from = str(self.boundjid) if self.is_component else None
|
|
self.send_message(
|
|
mto=jid,
|
|
mfrom=jid_from,
|
|
mbody=message_body,
|
|
mtype='chat')
|
|
|
|
# NOTE It appears to not work.
|
|
def send_headline(self, jid, message_subject, message_body):
|
|
jid_from = str(self.boundjid) if self.is_component else None
|
|
self.send_message(
|
|
mto=jid,
|
|
mfrom=jid_from,
|
|
msubject=message_subject,
|
|
mbody=message_body,
|
|
mtype='headline')
|