Commit 40052245 authored by Philipp Hörist's avatar Philipp Hörist

Correctly detect IBR feature

Fixes #10176
parent 4651cc7e
Pipeline #5919 passed with stages
in 4 minutes and 15 seconds
......@@ -138,9 +138,7 @@ class Discovery(BaseModule):
self._con.get_module('VCardTemp').pass_disco(result)
self._con.get_module('Carbons').pass_disco(result)
self._con.get_module('HTTPUpload').pass_disco(result)
if Namespace.REGISTER in result.features:
self._con.register_supported = True
self._con.get_module('Register').pass_disco(result)
self._con.connect_machine(restart=True)
......
......@@ -38,6 +38,11 @@ class Register(BaseModule):
self.agent_registrations = {}
self.supported = False
def pass_disco(self, info):
self.supported = Namespace.REGISTER in info.features
def register_agent(self, agent, form, is_form, success_cb, error_cb):
if not app.account_is_available(self._account):
return
......
......@@ -262,6 +262,8 @@ class ServerInfo(Gtk.ApplicationWindow, EventHelper):
con.get_module('MUC').supported),
Feature('XEP-0054: vcard-temp',
con.get_module('VCardTemp').supported),
Feature('XEP-0077: In-Band Registration',
con.get_module('Register').supported),
Feature('XEP-0163: Personal Eventing Protocol',
con.get_module('PEP').supported),
Feature('XEP-0163: #publish-options',
......
......@@ -674,5 +674,6 @@ class ChangePasswordSetting(DialogSetting):
activatable = False
if self.account in app.connections:
con = app.connections[self.account]
activatable = con.state.is_available and con.register_supported
activatable = (con.state.is_available and
con.get_module('Register').supported)
self.set_activatable(activatable)
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