Skip to content
Snippets Groups Projects
Commit ba956f1b authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Catch an error when the UI is not present

If the UI (Chat Window) is not open a key error is thrown
parent 832dfbb3
No related branches found
No related tags found
No related merge requests found
......@@ -430,8 +430,13 @@ class OmemoPlugin(GajimPlugin):
if state.build_session(recipient_id, device_id, bundle_dict):
log.warn(recipient_id + ' => session created')
# Warn User about new Fingerprints in DB if Chat Window is Open
if self.ui_list[account_name][recipient_id]:
self.ui_list[account_name][recipient_id].WarnIfUndecidedFingerprints()
try:
if self.ui_list[account_name][recipient_id]:
self.ui_list[account_name][recipient_id]. \
WarnIfUndecidedFingerprints()
except:
log.debug('No Ui present for ' + recipient_id +
', Ui Warning not shown')
@log_calls('OmemoPlugin')
def announce_support(self, account):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment