diff options
author | Philipp Hörist <forenjunkie@chello.at> | 2017-11-15 21:06:24 +0300 |
---|---|---|
committer | Philipp Hörist <forenjunkie@chello.at> | 2017-11-15 21:11:39 +0300 |
commit | 02c7edefe33bf7eb225af5a23af3cd571c5e7aec (patch) | |
tree | b3751a37ca12535d5fa689d6109af1234151db37 | |
parent | 6e42eae5568a634930ee285b358632e94bb71a35 (diff) |
[omemo] Show better error messages on device publish fail
-rw-r--r-- | omemo/omemo_connection.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/omemo/omemo_connection.py b/omemo/omemo_connection.py index 31630f2..a58c80d 100644 --- a/omemo/omemo_connection.py +++ b/omemo/omemo_connection.py @@ -607,9 +607,10 @@ class OMEMOConnection: self.send_with_callback(device_announce, self.device_list_publish_result) - @staticmethod - def device_list_publish_result(stanza): - log.debug(stanza) + def device_list_publish_result(self, stanza): + if not nbxmpp.isResultNode(stanza): + log.error('%s => Publishing devicelist failed: %s', + self.account, stanza.getError()) def are_keys_missing(self, contact_jid): """ Checks if devicekeys are missing and querys the @@ -756,10 +757,8 @@ class OMEMOConnection: if successful(stanza): devices_list = list(set(unpack_device_list_update(stanza, self.account))) if not devices_list: - log.error('%s => Devicelistquery was NOT successful', - self.account) self.publish_own_devices_list(new=True) - return False + return self.omemo.set_own_devices(devices_list) self.omemo.store.sessionStore.setActiveState( @@ -770,7 +769,8 @@ class OMEMOConnection: # overwritten by some other client self.publish_own_devices_list() else: - log.error('%s => Devicelistquery was NOT successful', self.account) + log.error('%s => Devicelistquery was NOT successful: %s', + self.account, stanza.getError()) self.publish_own_devices_list(new=True) def clear_device_list(self): |