From 55ba23881eb4f11256e7fe8eb9e1a10737c2d961 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Wed, 5 Sep 2007 18:23:16 +0000
Subject: [PATCH] don't check if there is a @ when we invite a JID.

---
 src/groupchat_control.py | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/src/groupchat_control.py b/src/groupchat_control.py
index df13bcda23..ad03a6d9f8 100644
--- a/src/groupchat_control.py
+++ b/src/groupchat_control.py
@@ -1276,19 +1276,13 @@ class GroupchatControl(ChatControlBase):
 			if len(message_array):
 				message_array = message_array[0].split()
 				invitee = message_array.pop(0)
-				if invitee.find('@') >= 0:
-					reason = ' '.join(message_array)
-					gajim.connections[self.account].send_invite(self.room_jid,
-						invitee, reason)
-					s = _('Invited %(contact_jid)s to %(room_jid)s.') % {
-						'contact_jid': invitee,
-						'room_jid': self.room_jid}
-					self.print_conversation(s, 'info')
-					self.clear(self.msg_textview)
-				else:
-					#%s is something the user wrote but it is not a jid so we inform
-					s = _('%s does not appear to be a valid JID') % invitee
-					self.print_conversation(s, 'info')
+				reason = ' '.join(message_array)
+				gajim.connections[self.account].send_invite(self.room_jid, invitee, reason)
+				s = _('Invited %(contact_jid)s to %(room_jid)s.') % {
+					'contact_jid': invitee,
+					'room_jid': self.room_jid}
+				self.print_conversation(s, 'info')
+				self.clear(self.msg_textview)
 			else:
 				self.get_command_help(command)
 			return True
-- 
GitLab