Do not add a nick to each bookmarked room
This commit is contained in:
parent
6767d04a1d
commit
686352d22b
2 changed files with 4 additions and 7 deletions
|
@ -28,9 +28,6 @@ class Bookmark(object):
|
||||||
self.jid = jid
|
self.jid = jid
|
||||||
self.name = name or jid
|
self.name = name or jid
|
||||||
self.autojoin = autojoin
|
self.autojoin = autojoin
|
||||||
if not nick:
|
|
||||||
default = os.environ.get('USER') if os.environ.get('USER') else 'poezio'
|
|
||||||
nick = config.get('default_nick', '') or default
|
|
||||||
self.nick = nick
|
self.nick = nick
|
||||||
self.password = password
|
self.password = password
|
||||||
self._method = method
|
self._method = method
|
||||||
|
|
|
@ -146,7 +146,7 @@ class Core(object):
|
||||||
self._current_tab_nb = 0
|
self._current_tab_nb = 0
|
||||||
self.previous_tab_nb = 0
|
self.previous_tab_nb = 0
|
||||||
|
|
||||||
self.own_nick = config.get('default_nick', '') or self.xmpp.boundjid.user
|
self.own_nick = config.get('default_nick', '') or self.xmpp.boundjid.user or os.environ.get('USER') or 'poezio'
|
||||||
|
|
||||||
self.plugins_autoloaded = False
|
self.plugins_autoloaded = False
|
||||||
self.plugin_manager = PluginManager(self)
|
self.plugin_manager = PluginManager(self)
|
||||||
|
@ -1810,7 +1810,7 @@ class Core(object):
|
||||||
if len(args) == 0:
|
if len(args) == 0:
|
||||||
tab = self.current_tab()
|
tab = self.current_tab()
|
||||||
roomname = tab.get_name()
|
roomname = tab.get_name()
|
||||||
if tab.joined:
|
if tab.joined and tab.own_nick != self.own_nick:
|
||||||
nick = tab.own_nick
|
nick = tab.own_nick
|
||||||
elif args[0] == '*':
|
elif args[0] == '*':
|
||||||
for tab in self.tabs:
|
for tab in self.tabs:
|
||||||
|
@ -3267,9 +3267,9 @@ class Core(object):
|
||||||
bookmark.get_remote(self.xmpp)
|
bookmark.get_remote(self.xmpp)
|
||||||
for bm in bookmark.bookmarks:
|
for bm in bookmark.bookmarks:
|
||||||
tab = self.get_tab_by_name(bm.jid, tabs.MucTab)
|
tab = self.get_tab_by_name(bm.jid, tabs.MucTab)
|
||||||
if not tab:
|
|
||||||
self.open_new_room(bm.jid, bm.nick, False)
|
|
||||||
nick = bm.nick if bm.nick else self.own_nick
|
nick = bm.nick if bm.nick else self.own_nick
|
||||||
|
if not tab:
|
||||||
|
self.open_new_room(bm.jid, nick, False)
|
||||||
self.initial_joins.append(bm.jid)
|
self.initial_joins.append(bm.jid)
|
||||||
histo_length = config.get('muc_history_length', 20)
|
histo_length = config.get('muc_history_length', 20)
|
||||||
if histo_length == -1:
|
if histo_length == -1:
|
||||||
|
|
Loading…
Reference in a new issue