From c2e122d87377acbc6b512b7fe83d1461ac876288 Mon Sep 17 00:00:00 2001 From: mathieui Date: Wed, 18 Apr 2012 00:22:30 +0200 Subject: Do not split on command_accept as it is unneeded --- src/tabs.py | 7 +++---- 1 file 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) -- cgit v1.2.3