Commit 1ca474e7 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

[omemo] Fix an endless loop with devicelists

parent 2ed1c39f
......@@ -443,10 +443,13 @@ class OMEMO(BaseModule):
NetworkEvent('omemo-new-fingerprint', chat_control=ctrl))
def set_devicelist(self):
def set_devicelist(self, devicelist=None):
devicelist_ = set([self.backend.own_device])
if devicelist is not None:
devicelist_.add(devicelist)'%s => Publishing own devicelist: %s',
self._account, self.backend.devices_for_publish)
self._account, devicelist_)
def clear_devicelist(self):
self.backend.update_devicelist(self._own_jid, [self.backend.own_device])
......@@ -488,7 +491,8 @@ class OMEMO(BaseModule):'%s => Received device list for %s: %s',
self._account, jid, devicelist)
self.backend.update_devicelist(jid, devicelist)
# Pass a copy, we need the full list for potential set_devicelist()
self.backend.update_devicelist(jid, list(devicelist))
if jid in self._query_for_bundles:
......@@ -497,7 +501,7 @@ class OMEMO(BaseModule):
if not self.backend.is_own_device_published:
# Our own device_id is not in the list, it could be
# overwritten by some other client
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