Download:
parent 36:d4200e4286b9
37:12b23bcac84b default tip
Anton Shestakov <av6@dwimlabs.net>, Wed, 04 Apr 2018 16:31:34 +0800
rollbot: actually set html body "Good" commit: https://github.com/fritzy/SleekXMPP/commit/648b03f81172829cae65f6ac9fc551e049310501 "Bad" commit: https://github.com/fritzy/SleekXMPP/commit/afc939708ff71e168f9204f1eab8823b7dc9f875#diff-5a3a55704faa3b6b84a4acd7ca6dd6f0 The former is why you need to explain code like that, the latter is why you need to run annotate first (and split commits).

1 файлов изменено, 3 вставок(+), 2 удалений(-) [+]
rollbot.py file | annotate | diff | comparison | revisions
--- a/rollbot.py Wed Apr 04 00:32:01 2018 +0800
+++ b/rollbot.py Wed Apr 04 16:31:34 2018 +0800
@@ -186,7 +186,7 @@
rbody, rxbody = self.respond(mbody)
if rbody:
msg.reply(rbody)
- msg['html'] = rxbody
+ msg['html']['body'] = rxbody
msg.send()
def muc_message(self, msg):
@@ -208,7 +208,7 @@
rbody = '%s: %s' % (msg['mucnick'], rbody)
rxbody = '%s: %s' % (cgi.escape(msg['mucnick']), rxbody)
msg.reply(rbody)
- msg['html'] = rxbody
+ msg['html']['body'] = rxbody
msg.send()
def muc_invite(self, invite):
@@ -284,6 +284,7 @@
rollbot.auto_subscribe = True
rollbot.register_plugin('xep_0030') # Service Discovery
rollbot.register_plugin('xep_0045') # Multi-User Chat
+ rollbot.register_plugin('xep_0071') # XHTML-IM
rollbot.register_plugin('xep_0092') # Software Version
rollbot.register_plugin('xep_0115') # Entity Capabilities
rollbot.register_plugin('xep_0199') # XMPP Ping