summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-04-18 00:22:30 +0200
committermathieui <mathieui@mathieui.net>2012-04-18 00:22:30 +0200
commitc2e122d87377acbc6b512b7fe83d1461ac876288 (patch)
tree379eb4d0eb84d7683c0c15f8686243a765301686 /src
parent5c06af299e51f7861649bcd74127ac8c40de09c1 (diff)
downloadpoezio-c2e122d87377acbc6b512b7fe83d1461ac876288.tar.gz
poezio-c2e122d87377acbc6b512b7fe83d1461ac876288.tar.bz2
poezio-c2e122d87377acbc6b512b7fe83d1461ac876288.tar.xz
poezio-c2e122d87377acbc6b512b7fe83d1461ac876288.zip
Do not split on command_accept as it is unneeded
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tabs.py b/src/tabs.py
index c2e2fc57..9c63f232 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -2015,12 +2015,11 @@ class RosterInfoTab(Tab):
if contact.ask == 'asked']
return the_input.auto_completion(jids, '')
- def command_accept(self, args):
+ def command_accept(self, arg):
"""
Accept a JID from in roster. Authorize it AND subscribe to it
"""
- args = args.split()
- if not args:
+ if not arg:
item = self.roster_win.selected_row
if isinstance(item, Contact) and item.ask == 'asked':
jid = item.bare_jid
@@ -2028,7 +2027,7 @@ class RosterInfoTab(Tab):
self.core.information('No subscription to accept')
return
else:
- jid = args[0]
+ jid = JID(arg).bare
self.core.xmpp.sendPresence(pto=jid, ptype='subscribed')
self.core.xmpp.sendPresence(pto=jid, ptype='')
contact = roster.get_contact_by_jid(jid)