Philipp Hörist pushed to branch master at gajim / gajim
Commits: bb5d0b9b by lovetox at 2021-02-15T16:22:04+01:00 Remove unused code
- - - - - 2d53fc26 by lovetox at 2021-02-15T16:23:19+01:00 Profile: Don’t check for server features
We just assume pubsub will be always there
- - - - -
2 changed files:
- gajim/application.py - gajim/common/modules/vcard_temp.py
Changes:
===================================== gajim/application.py ===================================== @@ -458,7 +458,7 @@ def _get_account_actions(account): ('-start-chat', a.start_chat, 'online', 'as'), ('-add-contact', a.on_add_contact, 'online', 'as'), ('-services', a.on_service_disco, 'online', 's'), - ('-profile', a.on_profile, 'feature', 's'), + ('-profile', a.on_profile, 'online', 's'), ('-server-info', a.on_server_info, 'online', 's'), ('-archive', a.on_mam_preferences, 'feature', 's'), ('-pep-config', a.on_pep_config, 'online', 's'), @@ -554,10 +554,7 @@ def _set_shortcuts(self): self.set_accels_for_action(action, accels)
def _on_feature_discovered(self, event): - if event.feature == Namespace.PUBSUB: - action = '%s-profile' % event.account - self.lookup_action(action).set_enabled(True) - elif event.feature == Namespace.MAM_2: + if event.feature == Namespace.MAM_2: action = '%s-archive' % event.account self.lookup_action(action).set_enabled(True) elif event.feature == Namespace.BLOCKING:
===================================== gajim/common/modules/vcard_temp.py ===================================== @@ -42,10 +42,6 @@ def pass_disco(self, info): self.supported = True self._log.info('Discovered vcard-temp: %s', info.jid)
- app.nec.push_incoming_event(NetworkEvent('feature-discovered', - account=self._account, - feature=Namespace.VCARD)) -
def get_instance(*args, **kwargs): return VCardTemp(*args, **kwargs), 'VCardTemp'
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/944600ebee34e71ca80e224f7ef40619...