diff --git a/slixfeed/config.py b/slixfeed/config.py index 97337fc..1a58344 100644 --- a/slixfeed/config.py +++ b/slixfeed/config.py @@ -67,8 +67,6 @@ class Config: return result async def set_setting_value(settings, jid_bare, db_file, key, val): - print('key and val (inside)') - print(key, val) key = key.lower() key_val = [key, val] settings[jid_bare][key] = val diff --git a/slixfeed/version.py b/slixfeed/version.py index bf78382..004c8c5 100644 --- a/slixfeed/version.py +++ b/slixfeed/version.py @@ -1,2 +1,2 @@ -__version__ = '0.1.40' -__version_info__ = (0, 1, 40) +__version__ = '0.1.41' +__version_info__ = (0, 1, 41) diff --git a/slixfeed/xmpp/bookmark.py b/slixfeed/xmpp/bookmark.py index d61f560..3fec8ee 100644 --- a/slixfeed/xmpp/bookmark.py +++ b/slixfeed/xmpp/bookmark.py @@ -40,9 +40,6 @@ class XmppBookmark: result = await self.plugin['xep_0048'].get_bookmarks() conferences = result['private']['bookmarks']['conferences'] groupchats = [] - for conference in conferences: - if conference['jid'] != properties['jid']: - groupchats.extend([conference]) if properties: properties['jid'] = properties['room'] + '@' + properties['host'] if not properties['alias']: properties['alias'] = self.alias @@ -54,6 +51,9 @@ class XmppBookmark: 'autojoin' : True, 'password' : None, } + for conference in conferences: + if conference['jid'] != properties['jid']: + groupchats.extend([conference]) # FIXME Ad-hoc bookmark form is stuck # if jid not in groupchats: if properties['jid'] not in groupchats: diff --git a/slixfeed/xmpp/client.py b/slixfeed/xmpp/client.py index be09e8f..d95f772 100644 --- a/slixfeed/xmpp/client.py +++ b/slixfeed/xmpp/client.py @@ -294,7 +294,8 @@ class Slixfeed(slixmpp.ClientXMPP): # self.send_presence() profile.set_identity(self, 'client') self['xep_0115'].update_caps() - XmppGroupchat.autojoin(self) + bookmarks = await self.plugin['xep_0048'].get_bookmarks() + XmppGroupchat.autojoin(self, bookmarks) time_end = time.time() difference = time_end - time_begin if difference > 1: logger.warning('{} (time: {})'.format(function_name, diff --git a/slixfeed/xmpp/process.py b/slixfeed/xmpp/process.py index 0325527..6a4c6b0 100644 --- a/slixfeed/xmpp/process.py +++ b/slixfeed/xmpp/process.py @@ -822,7 +822,6 @@ async def message(self, message): db_file = config.get_pathname_to_database(jid_file) key = 'old' val = 0 - print('key and val (outside)') await Config.set_setting_value(self.settings, jid_bare, db_file, key, val) response = 'Only new items of newly added feeds be delivered.'