Daniel Brötzmann pushed to branch omemo_integration at gajim / gajim
Commits:
-
ff89b64b
by wurstsalat at 2023-03-29T10:16:13+02:00
-
078e3553
by wurstsalat at 2023-03-29T10:21:22+02:00
2 changed files:
Changes:
| ... | ... | @@ -943,8 +943,7 @@ def __init__(self, account: str) -> None: |
| 943 | 943 | btbv_label = Gtk.Label()
|
| 944 | 944 | btbv_label.set_xalign(0)
|
| 945 | 945 | markup = '<a href="%s">%s</a>' % (
|
| 946 | - 'https://dev.gajim.org/gajim/gajim-plugins/-/'
|
|
| 947 | - 'wikis/omemogajimplugin',
|
|
| 946 | + 'https://dev.gajim.org/gajim/gajim/-/wikis/help/OMEMO',
|
|
| 948 | 947 | _('Read more about blind trust'))
|
| 949 | 948 | btbv_label.set_markup(markup)
|
| 950 | 949 | self.add(btbv_label)
|
| ... | ... | @@ -336,20 +336,21 @@ def _update_encryption_button(self) -> None: |
| 336 | 336 | |
| 337 | 337 | def _update_encryption_details_button(self) -> None:
|
| 338 | 338 | contact = self.get_current_contact()
|
| 339 | - state = contact.settings.get('encryption')
|
|
| 339 | + encryption = contact.settings.get('encryption')
|
|
| 340 | 340 | |
| 341 | - encryption_state = {'visible': bool(state),
|
|
| 342 | - 'enc_type': state,
|
|
| 341 | + encryption_state = {'visible': bool(encryption),
|
|
| 342 | + 'enc_type': encryption,
|
|
| 343 | 343 | 'authenticated': False}
|
| 344 | 344 | |
| 345 | - if state:
|
|
| 346 | - app.plugin_manager.extension_point(
|
|
| 347 | - f'encryption_state{state}',
|
|
| 348 | - app.window.get_control(),
|
|
| 349 | - encryption_state)
|
|
| 350 | - |
|
| 351 | - if state == 'OMEMO':
|
|
| 352 | - encryption_state['authenticated'] = True
|
|
| 345 | + if encryption:
|
|
| 346 | + if encryption == 'OMEMO':
|
|
| 347 | + encryption_state['authenticated'] = True
|
|
| 348 | + else:
|
|
| 349 | + # Only fire extension_point for plugins (i.e. not OMEMO)
|
|
| 350 | + app.plugin_manager.extension_point(
|
|
| 351 | + f'encryption_state{encryption}',
|
|
| 352 | + app.window.get_control(),
|
|
| 353 | + encryption_state)
|
|
| 353 | 354 | |
| 354 | 355 | visible, enc_type, authenticated = encryption_state.values()
|
| 355 | 356 | assert isinstance(visible, bool)
|