Commit 5ba5bc17 authored by Philipp Hörist's avatar Philipp Hörist

Adapt to nbxmpp changes

nbxmpp returns now in more places JID objects
parent 3f0ebda2
Pipeline #3819 passed with stages
in 2 minutes and 55 seconds
......@@ -203,7 +203,7 @@ class Bookmarks(BaseModule):
minimize = app.config.get_per('rooms', bookmark.jid,
'minimize_on_autojoin', True)
app.interface.join_gc_room(
self._account, bookmark.jid, bookmark.nick,
self._account, str(bookmark.jid), bookmark.nick,
bookmark.password, minimize=minimize)
def add_bookmark(self, name, jid, autojoin, password, nick):
......
......@@ -61,7 +61,7 @@ class ManageBookmarksWindow:
for bookmark in bookmarks:
self.treestore.append(iter_, [account,
bookmark.name,
bookmark.jid,
str(bookmark.jid),
bookmark.autojoin,
bookmark.password,
bookmark.nick,
......
......@@ -368,7 +368,7 @@ class GroupchatConfig(Gtk.ApplicationWindow):
if affiliation == 'outcast':
reason = attrs.get('reason')
self._ui.outcast_store.append(
[jid,
[str(jid),
reason,
None,
affiliation,
......@@ -381,7 +381,7 @@ class GroupchatConfig(Gtk.ApplicationWindow):
nick = attrs.get('nick')
role = attrs.get('role')
self._ui.affiliation_store.append(
[jid,
[str(jid),
nick,
role,
affiliation,
......
......@@ -182,10 +182,10 @@ show_bookmarked=False, force_resource=False):
item = Gtk.SeparatorMenuItem.new() # separator
invite_to_submenu.append(item)
for (room_jid, account) in rooms2:
menuitem = Gtk.MenuItem.new_with_label(room_jid.split('@')[0])
menuitem = Gtk.MenuItem.new_with_label(room_jid.getNode())
if len(contact_list) > 1: # several resources
menuitem.set_submenu(build_resources_submenu(
contact_list, account, roster.on_invite_to_room, room_jid,
contact_list, account, roster.on_invite_to_room, str(room_jid),
account))
else:
# use resource if it's self contact
......@@ -194,7 +194,7 @@ show_bookmarked=False, force_resource=False):
else:
resource = None
menuitem.connect('activate', roster.on_invite_to_room, list_,
room_jid, account, resource)
str(room_jid), account, resource)
invite_to_submenu.append(menuitem)
def get_contact_menu(contact, account, use_multiple_contacts=True,
......@@ -719,7 +719,7 @@ def get_bookmarks_menu(account, rebuild=False):
# Create Variant Dict
dict_ = {'account': GLib.Variant('s', account),
'jid': GLib.Variant('s', bookmark.jid)}
'jid': GLib.Variant('s', str(bookmark.jid))}
if bookmark.nick:
dict_['nick'] = GLib.Variant('s', bookmark.nick)
if bookmark.password:
......
......@@ -2687,7 +2687,7 @@ class RosterWindow:
def on_bookmark_menuitem_activate(self, widget, account, bookmark):
app.interface.join_gc_room(
account, bookmark.jid, bookmark.nick, bookmark.password)
account, str(bookmark.jid), bookmark.nick, bookmark.password)
def on_info(self, widget, contact, account):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment