From 71ae73ca7b37123d741eb065dc26d85d12922c43 Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 17 Apr 2014 00:02:19 +0200 Subject: Log part messages and show a leave message on /cycle --- src/multiuserchat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/multiuserchat.py') diff --git a/src/multiuserchat.py b/src/multiuserchat.py index 93fde819..d1921100 100644 --- a/src/multiuserchat.py +++ b/src/multiuserchat.py @@ -64,7 +64,7 @@ def change_nick(core, jid, nick, status=None, show=None): core.events.trigger('changing_nick', presence) presence.send() -def join_groupchat(core, jid, nick, passwd='', maxhistory=None, status=None, show=None, seconds=0): +def join_groupchat(core, jid, nick, passwd='', maxhistory=None, status=None, show=None, seconds=None): xmpp = core.xmpp stanza = xmpp.makePresence(pto='%s/%s' % (jid, nick), pstatus=status, pshow=show) x = ET.Element('{http://jabber.org/protocol/muc}x') @@ -72,7 +72,7 @@ def join_groupchat(core, jid, nick, passwd='', maxhistory=None, status=None, sho passelement = ET.Element('password') passelement.text = passwd x.append(passelement) - if seconds: + if seconds is not None: history = ET.Element('{http://jabber.org/protocol/muc}history') history.attrib['seconds'] = str(seconds) x.append(history) -- cgit v1.2.3