Commit bbdc14aa authored by mathieui's avatar mathieui

Remove Tab.get_name() and use Tab.name instead

(keep a get_name() fallback just in case for now)
parent d859ec2e
...@@ -291,7 +291,7 @@ class Plugin(BasePlugin): ...@@ -291,7 +291,7 @@ class Plugin(BasePlugin):
jid = JID(args[1]) jid = JID(args[1])
else: else:
if isinstance(self.core.current_tab(), ConversationTab): if isinstance(self.core.current_tab(), ConversationTab):
jid = JID(self.core.current_tab().get_name()) jid = JID(self.core.current_tab().name)
else: else:
return return
command = args[0] command = args[0]
......
...@@ -73,14 +73,14 @@ class Plugin(BasePlugin): ...@@ -73,14 +73,14 @@ class Plugin(BasePlugin):
def command_private_ping(self, arg): def command_private_ping(self, arg):
if arg: if arg:
return self.command_ping(arg) return self.command_ping(arg)
self.command_ping(self.api.current_tab().get_name()) self.command_ping(self.api.current_tab().name)
def command_muc_ping(self, arg): def command_muc_ping(self, arg):
if not arg.strip(): if not arg.strip():
return return
user = self.api.current_tab().get_user_by_name(arg) user = self.api.current_tab().get_user_by_name(arg)
if user: if user:
jid = safeJID(self.api.current_tab().get_name()) jid = safeJID(self.api.current_tab().name)
jid.resource = user.nick jid.resource = user.nick
else: else:
jid = safeJID(arg) jid = safeJID(arg)
......
...@@ -65,8 +65,8 @@ class Plugin(BasePlugin): ...@@ -65,8 +65,8 @@ class Plugin(BasePlugin):
res += "%s seconds, " % seconds res += "%s seconds, " % seconds
return res[:-2] return res[:-2]
last_message_date = self.last_messages.get(tab.get_name()) last_message_date = self.last_messages.get(tab.name)
self.last_messages[tab.get_name()] = datetime.now() self.last_messages[tab.name] = datetime.now()
if last_message_date: if last_message_date:
delta = datetime.now() - last_message_date delta = datetime.now() - last_message_date
if delta >= timedelta(0, self.config.get('delay', 900)): if delta >= timedelta(0, self.config.get('delay', 900)):
......
...@@ -147,7 +147,7 @@ def command_presence(self, arg): ...@@ -147,7 +147,7 @@ def command_presence(self, arg):
else: else:
return return
if jid == '.' and isinstance(self.current_tab(), tabs.ChatTab): if jid == '.' and isinstance(self.current_tab(), tabs.ChatTab):
jid = self.current_tab().get_name() jid = self.current_tab().name
if type == 'available': if type == 'available':
type = None type = None
try: try:
...@@ -238,7 +238,7 @@ def command_move_tab(self, arg): ...@@ -238,7 +238,7 @@ def command_move_tab(self, arg):
except ValueError: except ValueError:
old_tab = None old_tab = None
for tab in self.tabs: for tab in self.tabs:
if not old_tab and value == tab.get_name(): if not old_tab and value == tab.name:
old_tab = tab old_tab = tab
if not old_tab: if not old_tab:
self.information("Tab %s does not exist" % args[0], "Error") self.information("Tab %s does not exist" % args[0], "Error")
...@@ -269,7 +269,7 @@ def command_list(self, arg): ...@@ -269,7 +269,7 @@ def command_list(self, arg):
else: else:
if not isinstance(self.current_tab(), tabs.MucTab): if not isinstance(self.current_tab(), tabs.MucTab):
return self.information('Please provide a server', 'Error') return self.information('Please provide a server', 'Error')
server = safeJID(self.current_tab().get_name()).server server = safeJID(self.current_tab().name).server
list_tab = tabs.MucListTab(server) list_tab = tabs.MucListTab(server)
self.add_tab(list_tab, True) self.add_tab(list_tab, True)
cb = list_tab.on_muc_list_item_received cb = list_tab.on_muc_list_item_received
...@@ -316,7 +316,7 @@ def command_join(self, arg, histo_length=None): ...@@ -316,7 +316,7 @@ def command_join(self, arg, histo_length=None):
tab = self.current_tab() tab = self.current_tab()
if not isinstance(tab, (tabs.MucTab, tabs.PrivateTab)): if not isinstance(tab, (tabs.MucTab, tabs.PrivateTab)):
return return
room = safeJID(tab.get_name()).bare room = safeJID(tab.name).bare
nick = tab.own_nick nick = tab.own_nick
else: else:
if args[0].startswith('@'): # we try to join a server directly if args[0].startswith('@'): # we try to join a server directly
...@@ -335,7 +335,7 @@ def command_join(self, arg, histo_length=None): ...@@ -335,7 +335,7 @@ def command_join(self, arg, histo_length=None):
tab = self.current_tab() tab = self.current_tab()
if not isinstance(tab, tabs.MucTab): if not isinstance(tab, tabs.MucTab):
return return
room = tab.get_name() room = tab.name
if nick == '': if nick == '':
nick = tab.own_nick nick = tab.own_nick
else: else:
...@@ -345,8 +345,8 @@ def command_join(self, arg, histo_length=None): ...@@ -345,8 +345,8 @@ def command_join(self, arg, histo_length=None):
# check if the current room's name has a server # check if the current room's name has a server
if room.find('@') == -1 and not server_root: if room.find('@') == -1 and not server_root:
if isinstance(self.current_tab(), tabs.MucTab) and\ if isinstance(self.current_tab(), tabs.MucTab) and\
self.current_tab().get_name().find('@') != -1: self.current_tab().name.find('@') != -1:
domain = safeJID(self.current_tab().get_name()).domain domain = safeJID(self.current_tab().name).domain
room += '@%s' % domain room += '@%s' % domain
else: else:
room = args[0] room = args[0]
...@@ -421,15 +421,15 @@ def command_bookmark_local(self, arg=''): ...@@ -421,15 +421,15 @@ def command_bookmark_local(self, arg=''):
return return
if not args: if not args:
tab = self.current_tab() tab = self.current_tab()
roomname = tab.get_name() roomname = tab.name
if tab.joined and tab.own_nick != self.own_nick: if tab.joined and tab.own_nick != self.own_nick:
nick = tab.own_nick nick = tab.own_nick
elif args[0] == '*': elif args[0] == '*':
new_bookmarks = [] new_bookmarks = []
for tab in self.get_tabs(tabs.MucTab): for tab in self.get_tabs(tabs.MucTab):
b = bookmark.get_by_jid(tab.get_name()) b = bookmark.get_by_jid(tab.name)
if not b: if not b:
b = bookmark.Bookmark(tab.get_name(), b = bookmark.Bookmark(tab.name,
autojoin=True, autojoin=True,
method="local") method="local")
new_bookmarks.append(b) new_bookmarks.append(b)
...@@ -451,7 +451,7 @@ def command_bookmark_local(self, arg=''): ...@@ -451,7 +451,7 @@ def command_bookmark_local(self, arg=''):
if not roomname: if not roomname:
if not isinstance(self.current_tab(), tabs.MucTab): if not isinstance(self.current_tab(), tabs.MucTab):
return return
roomname = self.current_tab().get_name() roomname = self.current_tab().name
if len(args) > 1: if len(args) > 1:
password = args[1] password = args[1]
...@@ -485,7 +485,7 @@ def command_bookmark(self, arg=''): ...@@ -485,7 +485,7 @@ def command_bookmark(self, arg=''):
return return
if not args: if not args:
tab = self.current_tab() tab = self.current_tab()
roomname = tab.get_name() roomname = tab.name
if tab.joined: if tab.joined:
nick = tab.own_nick nick = tab.own_nick
autojoin = True autojoin = True
...@@ -497,9 +497,9 @@ def command_bookmark(self, arg=''): ...@@ -497,9 +497,9 @@ def command_bookmark(self, arg=''):
autojoin = True autojoin = True
new_bookmarks = [] new_bookmarks = []
for tab in self.get_tabs(tabs.MucTab): for tab in self.get_tabs(tabs.MucTab):
b = bookmark.get_by_jid(tab.get_name()) b = bookmark.get_by_jid(tab.name)
if not b: if not b:
b = bookmark.Bookmark(tab.get_name(), autojoin=autojoin, b = bookmark.Bookmark(tab.name, autojoin=autojoin,
method=bookmark.preferred) method=bookmark.preferred)
new_bookmarks.append(b) new_bookmarks.append(b)
else: else:
...@@ -523,7 +523,7 @@ def command_bookmark(self, arg=''): ...@@ -523,7 +523,7 @@ def command_bookmark(self, arg=''):
if roomname == '': if roomname == '':
if not isinstance(self.current_tab(), tabs.MucTab): if not isinstance(self.current_tab(), tabs.MucTab):
return return
roomname = self.current_tab().get_name() roomname = self.current_tab().name
if len(args) > 1: if len(args) > 1:
autojoin = False if args[1].lower() != 'true' else True autojoin = False if args[1].lower() != 'true' else True
else: else:
...@@ -571,8 +571,8 @@ def command_remove_bookmark(self, arg=''): ...@@ -571,8 +571,8 @@ def command_remove_bookmark(self, arg=''):
args = common.shell_split(arg) args = common.shell_split(arg)
if not args: if not args:
tab = self.current_tab() tab = self.current_tab()
if isinstance(tab, tabs.MucTab) and bookmark.get_by_jid(tab.get_name()): if isinstance(tab, tabs.MucTab) and bookmark.get_by_jid(tab.name):
bookmark.remove(tab.get_name()) bookmark.remove(tab.name)
bookmark.save(self.xmpp) bookmark.save(self.xmpp)
if bookmark.save(self.xmpp): if bookmark.save(self.xmpp):
self.information('Bookmark deleted', 'Info') self.information('Bookmark deleted', 'Info')
...@@ -643,22 +643,22 @@ def command_server_cycle(self, arg=''): ...@@ -643,22 +643,22 @@ def command_server_cycle(self, arg=''):
message = args[1] message = args[1]
else: else:
if isinstance(tab, tabs.MucTab): if isinstance(tab, tabs.MucTab):
domain = safeJID(tab.get_name()).domain domain = safeJID(tab.name).domain
else: else:
self.information(_("No server specified"), "Error") self.information(_("No server specified"), "Error")
return return
for tab in self.get_tabs(tabs.MucTab): for tab in self.get_tabs(tabs.MucTab):
if tab.get_name().endswith(domain): if tab.name.endswith(domain):
if tab.joined: if tab.joined:
muc.leave_groupchat(tab.core.xmpp, muc.leave_groupchat(tab.core.xmpp,
tab.get_name(), tab.name,
tab.own_nick, tab.own_nick,
message) message)
tab.joined = False tab.joined = False
if tab.get_name() == domain: if tab.name == domain:
self.command_join('"@%s/%s"' %(tab.get_name(), tab.own_nick)) self.command_join('"@%s/%s"' %(tab.name, tab.own_nick))
else: else:
self.command_join('"%s/%s"' %(tab.get_name(), tab.own_nick)) self.command_join('"%s/%s"' %(tab.name, tab.own_nick))
def command_last_activity(self, arg): def command_last_activity(self, arg):
""" """
...@@ -928,7 +928,7 @@ def command_message(self, arg): ...@@ -928,7 +928,7 @@ def command_message(self, arg):
if not tab: if not tab:
tab = self.open_conversation_window(jid.full, focus=True) tab = self.open_conversation_window(jid.full, focus=True)
else: else:
self.focus_tab_named(tab.get_name()) self.focus_tab_named(tab.name)
if len(args) > 1: if len(args) > 1:
tab.command_say(args[1]) tab.command_say(args[1])
......
...@@ -98,7 +98,7 @@ def completion_join(self, the_input): ...@@ -98,7 +98,7 @@ def completion_join(self, the_input):
relevant_rooms.extend(sorted(self.pending_invites.keys())) relevant_rooms.extend(sorted(self.pending_invites.keys()))
bookmarks = {str(elem.jid): False for elem in bookmark.bookmarks} bookmarks = {str(elem.jid): False for elem in bookmark.bookmarks}
for tab in self.get_tabs(tabs.MucTab): for tab in self.get_tabs(tabs.MucTab):
name = tab.get_name() name = tab.name
if name in bookmarks and not tab.joined: if name in bookmarks and not tab.joined:
bookmarks[name] = True bookmarks[name] = True
relevant_rooms.extend(sorted(room[0] for room in bookmarks.items() if room[1])) relevant_rooms.extend(sorted(room[0] for room in bookmarks.items() if room[1]))
...@@ -126,7 +126,7 @@ def completion_join(self, the_input): ...@@ -126,7 +126,7 @@ def completion_join(self, the_input):
serv_list = [] serv_list = []
for tab in self.get_tabs(tabs.MucTab): for tab in self.get_tabs(tabs.MucTab):
if tab.joined: if tab.joined:
serv_list.append('%s@%s'% (jid.user, safeJID(tab.get_name()).host)) serv_list.append('%s@%s'% (jid.user, safeJID(tab.name).host))
serv_list.extend(relevant_rooms) serv_list.extend(relevant_rooms)
return the_input.new_completion(serv_list, 1, quotify=True) return the_input.new_completion(serv_list, 1, quotify=True)
elif args[1].startswith('/'): elif args[1].startswith('/'):
...@@ -147,8 +147,8 @@ def completion_list(self, the_input): ...@@ -147,8 +147,8 @@ def completion_list(self, the_input):
"""Completion for /list""" """Completion for /list"""
muc_serv_list = [] muc_serv_list = []
for tab in self.get_tabs(tabs.MucTab): # TODO, also from an history for tab in self.get_tabs(tabs.MucTab): # TODO, also from an history
if tab.get_name() not in muc_serv_list: if tab.name not in muc_serv_list:
muc_serv_list.append(safeJID(tab.get_name()).server) muc_serv_list.append(safeJID(tab.name).server)
if muc_serv_list: if muc_serv_list:
return the_input.new_completion(muc_serv_list, 1, quotify=False) return the_input.new_completion(muc_serv_list, 1, quotify=False)
...@@ -157,7 +157,7 @@ def completion_move_tab(self, the_input): ...@@ -157,7 +157,7 @@ def completion_move_tab(self, the_input):
"""Completion for /move_tab""" """Completion for /move_tab"""
n = the_input.get_argument_position(quoted=True) n = the_input.get_argument_position(quoted=True)
if n == 1: if n == 1:
nodes = [tab.get_name() for tab in self.tabs if tab] nodes = [tab.name for tab in self.tabs if tab]
nodes.remove('Roster') nodes.remove('Roster')
return the_input.new_completion(nodes, 1, ' ', quotify=True) return the_input.new_completion(nodes, 1, ' ', quotify=True)
...@@ -199,7 +199,7 @@ def completion_bookmark(self, the_input): ...@@ -199,7 +199,7 @@ def completion_bookmark(self, the_input):
nicks.append(nick) nicks.append(nick)
jids_list = ['%s/%s' % (jid.bare, nick) for nick in nicks] jids_list = ['%s/%s' % (jid.bare, nick) for nick in nicks]
return the_input.new_completion(jids_list, 1, quotify=True) return the_input.new_completion(jids_list, 1, quotify=True)
muc_list = [tab.get_name() for tab in self.get_tabs(tabs.MucTab)] muc_list = [tab.name for tab in self.get_tabs(tabs.MucTab)]
muc_list.sort() muc_list.sort()
muc_list.append('*') muc_list.append('*')
return the_input.new_completion(muc_list, 1, quotify=True) return the_input.new_completion(muc_list, 1, quotify=True)
...@@ -259,7 +259,7 @@ def completion_invite(self, the_input): ...@@ -259,7 +259,7 @@ def completion_invite(self, the_input):
rooms = [] rooms = []
for tab in self.get_tabs(tabs.MucTab): for tab in self.get_tabs(tabs.MucTab):
if tab.joined: if tab.joined:
rooms.append(tab.get_name()) rooms.append(tab.name)
rooms.sort() rooms.sort()
return the_input.new_completion(rooms, n, '', quotify=True) return the_input.new_completion(rooms, n, '', quotify=True)
...@@ -300,7 +300,7 @@ def completion_server_cycle(self, the_input): ...@@ -300,7 +300,7 @@ def completion_server_cycle(self, the_input):
"""Completion for /server_cycle""" """Completion for /server_cycle"""
serv_list = set() serv_list = set()
for tab in self.get_tabs(tabs.MucTab): for tab in self.get_tabs(tabs.MucTab):
serv = safeJID(tab.get_name()).server serv = safeJID(tab.name).server
serv_list.add(serv) serv_list.add(serv)
return the_input.new_completion(sorted(serv_list), 1, ' ') return the_input.new_completion(sorted(serv_list), 1, ' ')
...@@ -380,7 +380,7 @@ def completion_bookmark_local(self, the_input): ...@@ -380,7 +380,7 @@ def completion_bookmark_local(self, the_input):
nicks.append(nick) nicks.append(nick)
jids_list = ['%s/%s' % (jid.bare, nick) for nick in nicks] jids_list = ['%s/%s' % (jid.bare, nick) for nick in nicks]
return the_input.new_completion(jids_list, 1, quotify=True) return the_input.new_completion(jids_list, 1, quotify=True)
muc_list = [tab.get_name() for tab in self.get_tabs(tabs.MucTab)] muc_list = [tab.name for tab in self.get_tabs(tabs.MucTab)]
muc_list.append('*') muc_list.append('*')
return the_input.new_completion(muc_list, 1, quotify=True) return the_input.new_completion(muc_list, 1, quotify=True)
...@@ -902,7 +902,7 @@ class Core(object): ...@@ -902,7 +902,7 @@ class Core(object):
If typ is provided, return a tab of this type only If typ is provided, return a tab of this type only
""" """
for tab in self.tabs: for tab in self.tabs:
if tab.get_name() == name: if tab.name == name:
if (typ and isinstance(tab, typ)) or\ if (typ and isinstance(tab, typ)) or\
not typ: not typ:
return tab return tab
...@@ -1081,7 +1081,7 @@ class Core(object): ...@@ -1081,7 +1081,7 @@ class Core(object):
def focus_tab_named(self, tab_name, type_=None): def focus_tab_named(self, tab_name, type_=None):
"""Returns True if it found a tab to focus on""" """Returns True if it found a tab to focus on"""
for tab in self.tabs: for tab in self.tabs:
if tab.get_name() == tab_name: if tab.name == tab_name:
if (type_ and (isinstance(tab, type_))) or not type_: if (type_ and (isinstance(tab, type_))) or not type_:
self.command_win('%s' % (tab.nb,)) self.command_win('%s' % (tab.nb,))
return True return True
...@@ -1133,7 +1133,7 @@ class Core(object): ...@@ -1133,7 +1133,7 @@ class Core(object):
complete_jid = room_name+'/'+user_nick complete_jid = room_name+'/'+user_nick
# if the room exists, focus it and return # if the room exists, focus it and return
for tab in self.get_tabs(tabs.PrivateTab): for tab in self.get_tabs(tabs.PrivateTab):
if tab.get_name() == complete_jid: if tab.name == complete_jid:
self.command_win('%s' % tab.nb) self.command_win('%s' % tab.nb)
return tab return tab
# create the new tab # create the new tab
...@@ -1206,7 +1206,7 @@ class Core(object): ...@@ -1206,7 +1206,7 @@ class Core(object):
if reason is None: if reason is None:
reason = _('\x195}You left the chatroom\x193}') reason = _('\x195}You left the chatroom\x193}')
for tab in self.get_tabs(tabs.PrivateTab): for tab in self.get_tabs(tabs.PrivateTab):
if tab.get_name().startswith(room_name): if tab.name.startswith(room_name):
tab.deactivate(reason=reason) tab.deactivate(reason=reason)
def enable_private_tabs(self, room_name, reason=None): def enable_private_tabs(self, room_name, reason=None):
...@@ -1216,7 +1216,7 @@ class Core(object): ...@@ -1216,7 +1216,7 @@ class Core(object):
if reason is None: if reason is None:
reason = _('\x195}You joined the chatroom\x193}') reason = _('\x195}You joined the chatroom\x193}')
for tab in self.get_tabs(tabs.PrivateTab): for tab in self.get_tabs(tabs.PrivateTab):
if tab.get_name().startswith(room_name): if tab.name.startswith(room_name):
tab.activate(reason=reason) tab.activate(reason=reason)
def on_user_changed_status_in_private(self, jid, msg): def on_user_changed_status_in_private(self, jid, msg):
...@@ -1246,10 +1246,10 @@ class Core(object): ...@@ -1246,10 +1246,10 @@ class Core(object):
self.tabs[nb] = tabs.GapTab() self.tabs[nb] = tabs.GapTab()
else: else:
self.tabs.remove(tab) self.tabs.remove(tab)
if tab and tab.get_name() in logger.fds: if tab and tab.name in logger.fds:
logger.fds[tab.get_name()].close() logger.fds[tab.name].close()
log.debug("Log file for %s closed.", tab.get_name()) log.debug("Log file for %s closed.", tab.name)
del logger.fds[tab.get_name()] del logger.fds[tab.name]
if self.current_tab_nb >= len(self.tabs): if self.current_tab_nb >= len(self.tabs):
self.current_tab_nb = len(self.tabs) - 1 self.current_tab_nb = len(self.tabs) - 1
while not self.tabs[self.current_tab_nb]: while not self.tabs[self.current_tab_nb]:
......
...@@ -161,7 +161,7 @@ def on_message(self, message): ...@@ -161,7 +161,7 @@ def on_message(self, message):
# Differentiate both type of messages, and call the appropriate handler. # Differentiate both type of messages, and call the appropriate handler.
jid_from = message['from'] jid_from = message['from']
for tab in self.get_tabs(tabs.MucTab): for tab in self.get_tabs(tabs.MucTab):
if tab.get_name() == jid_from.bare: if tab.name == jid_from.bare:
if message['type'] == 'error': if message['type'] == 'error':
return self.room_error(message, jid_from) return self.room_error(message, jid_from)
else: else:
...@@ -1003,12 +1003,12 @@ def on_attention(self, message): ...@@ -1003,12 +1003,12 @@ def on_attention(self, message):
jid_from = message['from'] jid_from = message['from']
self.information('%s requests your attention!' % jid_from, 'Info') self.information('%s requests your attention!' % jid_from, 'Info')
for tab in self.tabs: for tab in self.tabs:
if tab.get_name() == jid_from: if tab.name == jid_from:
tab.state = 'attention' tab.state = 'attention'
self.refresh_tab_win() self.refresh_tab_win()
return return
for tab in self.tabs: for tab in self.tabs:
if tab.get_name() == jid_from.bare: if tab.name == jid_from.bare:
tab.state = 'attention' tab.state = 'attention'
self.refresh_tab_win() self.refresh_tab_win()
return return
......
...@@ -90,6 +90,7 @@ class Tab(object): ...@@ -90,6 +90,7 @@ class Tab(object):
plugin_commands = {} plugin_commands = {}
plugin_keys = {} plugin_keys = {}
def __init__(self): def __init__(self):
self.name = self.__class__.__name__
self.input = None self.input = None
self._state = 'normal' self._state = 'normal'
self._prev_state = None self._prev_state = None
...@@ -299,13 +300,13 @@ class Tab(object): ...@@ -299,13 +300,13 @@ class Tab(object):
""" """
get the name of the tab get the name of the tab
""" """
return self.__class__.__name__ return self.name
def get_nick(self): def get_nick(self):
""" """
Get the nick of the tab (defaults to its name) Get the nick of the tab (defaults to its name)
""" """
return self.get_name() return self.name
def get_text_window(self): def get_text_window(self):
""" """
...@@ -410,7 +411,8 @@ class GapTab(Tab): ...@@ -410,7 +411,8 @@ class GapTab(Tab):
def __len__(self): def __len__(self):
return 0 return 0
def get_name(self): @property
def name(self):
return '' return ''
def refresh(self): def refresh(self):
...@@ -476,7 +478,7 @@ class ChatTab(Tab): ...@@ -476,7 +478,7 @@ class ChatTab(Tab):
return False return False
def load_logs(self, log_nb): def load_logs(self, log_nb):
logs = logger.get_logs(safeJID(self.get_name()).bare, log_nb) logs = logger.get_logs(safeJID(self.name).bare, log_nb)
return logs return logs
def log_message(self, txt, nickname, time=None, typ=1): def log_message(self, txt, nickname, time=None, typ=1):
...@@ -569,7 +571,7 @@ class ChatTab(Tab): ...@@ -569,7 +571,7 @@ class ChatTab(Tab):
return msg return msg
def get_dest_jid(self): def get_dest_jid(self):
return self.get_name() return self.name
@refresh_wrapper.always @refresh_wrapper.always
def command_clear(self, args): def command_clear(self, args):
......
...@@ -73,7 +73,7 @@ class ConversationTab(ChatTab): ...@@ -73,7 +73,7 @@ class ConversationTab(ChatTab):
@property @property
def general_jid(self): def general_jid(self):
return safeJID(self.get_name()).bare return safeJID(self.name).bare
@staticmethod @staticmethod
def add_information_element(plugin_name, callback): def add_information_element(plugin_name, callback):
...@@ -109,7 +109,7 @@ class ConversationTab(ChatTab): ...@@ -109,7 +109,7 @@ class ConversationTab(ChatTab):