don't print reason where there is none

This commit is contained in:
Yann Leboulanger 2012-08-25 11:32:14 +02:00
parent b1d206d2ec
commit 1663c42b66
1 changed files with 8 additions and 3 deletions

View File

@ -619,9 +619,14 @@ class Interface:
account = obj.conn.name
gc_control = self.msg_win_mgr.get_gc_control(obj.room_jid, account)
if gc_control:
gc_control.print_conversation(
_('%(jid)s declined the invitation: %(reason)s') % {
'jid': obj.jid_from, 'reason': obj.reason}, graphics=False)
if obj.reason:
gc_control.print_conversation(
_('%(jid)s declined the invitation: %(reason)s') % {
'jid': obj.jid_from, 'reason': obj.reason}, graphics=False)
else:
gc_control.print_conversation(
_('%(jid)s declined the invitation') % {
'jid': obj.jid_from}, graphics=False)
def handle_event_gc_invitation(self, obj):
#('GC_INVITATION', (room_jid, jid_from, reason, password, is_continued))