From 8eb48d4533174e9747477cc7d7eed0d457442631 Mon Sep 17 00:00:00 2001 From: Stephan Erb Date: Mon, 30 Nov 2009 00:24:30 +0100 Subject: [PATCH] Remove redundant null checks. --- src/groupchat_control.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/groupchat_control.py b/src/groupchat_control.py index f8609ffcd..340ec2267 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -146,11 +146,7 @@ class PrivateChatControl(ChatControl): """ Call this method to send the message """ - if not message: - return - message = helpers.remove_invalid_xml_chars(message) - if not message: return @@ -158,7 +154,7 @@ class PrivateChatControl(ChatControl): # the recipient did not go away contact = gajim.contacts.get_first_contact_from_jid(self.account, self.contact.jid) - if contact is None: + if not contact: # contact was from pm in MUC room, nick = gajim.get_room_and_nick_from_fjid(self.contact.jid) gc_contact = gajim.contacts.get_gc_contact(self.account, room, nick)