diff options
author | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-02-14 04:30:04 +0000 |
---|---|---|
committer | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-02-14 04:30:04 +0000 |
commit | 724c45770c6736b436edcef08388e58a5c98cc99 (patch) | |
tree | ffb4092b4698f81a858f2c73bb07ca501fa59d66 | |
parent | cddb49385d5a7511dade10489ce96ee4dd7cfaa8 (diff) | |
download | poezio-724c45770c6736b436edcef08388e58a5c98cc99.tar.gz poezio-724c45770c6736b436edcef08388e58a5c98cc99.tar.bz2 poezio-724c45770c6736b436edcef08388e58a5c98cc99.tar.xz poezio-724c45770c6736b436edcef08388e58a5c98cc99.zip |
fixed #1156
-rw-r--r-- | src/gui.py | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -357,15 +357,14 @@ class Gui(object): self.information(_("message received for a non-existing room: %s") % (room_from)) return body = stanza.getBody() - if not body: - body = stanza.getSubject() - info = room.add_info(_("%(nick)s changed the subject to: %(subject)s") % {'nick':nick_from, 'subject':stanza.getSubject()}) + subject = stanza.getSubject() + if subject: + info = room.add_info(_("%(nick)s changed the subject to: %(subject)s") % {'nick':nick_from, 'subject':subject}) self.window.text_win.add_line(room, (datetime.now(), info)) - room.topic = stanza.getSubject().encode('utf-8').replace('\n', '|') + room.topic = subject.encode('utf-8').replace('\n', '|') if room == self.current_room(): self.window.topic_win.refresh(room.topic) self.window.text_win.refresh(room.name) - curses.doupdate() else: color = room.add_message(nick_from, body) self.window.text_win.add_line(room, (datetime.now(), nick_from.encode('utf-8'), body.encode('utf-8'), color)) |