Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
3eced77c by lovetox at 2020-05-07T17:53:55+02:00
Fix example client
- - - - -
1 changed file:
- nbxmpp/examples/client.py
Changes:
=====================================
nbxmpp/examples/client.py
=====================================
@@ -15,6 +15,7 @@ import nbxmpp
from nbxmpp.protocol import JID
from nbxmpp.client import Client
from nbxmpp.structs import ProxyData
+from nbxmpp.structs import StanzaHandler
from nbxmpp.addresses import ServerAddress
from nbxmpp.const import ConnectionType
from nbxmpp.const import ConnectionProtocol
@@ -108,7 +109,7 @@ class TestClient(Gtk.Window):
self._client.subscribe('stanza-sent', self._on_stanza_sent)
self._client.subscribe('stanza-received', self._on_stanza_received)
- self._client.register_handler('message', self._on_message)
+ self._client.register_handler(StanzaHandler('message', self._on_message))
@property
def password(self):
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/3eced77ce4d04d15109f98f2…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/3eced77ce4d04d15109f98f2…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
118be135 by lovetox at 2020-05-06T20:23:31+02:00
AccountWizard: Add fallback error message
- - - - -
1 changed file:
- gajim/gtk/account_wizard.py
Changes:
=====================================
gajim/gtk/account_wizard.py
=====================================
@@ -439,9 +439,11 @@ class AccountWizard(Assistant):
self._disconnect()
def _on_register_error(self, result):
- self._show_error_page(_('Error'),
- _('Error'),
- result.get_text())
+ error_text = result.get_text()
+ if not error_text:
+ error_text = _('The server rejected the registration '
+ 'without an error message')
+ self._show_error_page(_('Error'), _('Error'), error_text)
register_data = result.get_data()
if register_data is None:
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/118be135cfbfa2c6f3a598b479954ba6…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/118be135cfbfa2c6f3a598b479954ba6…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
ba85a309 by lovetox at 2020-05-03T19:26:06+02:00
Dispatcher: Fix unregister_handler()
- - - - -
1 changed file:
- nbxmpp/dispatcher.py
Changes:
=====================================
nbxmpp/dispatcher.py
=====================================
@@ -303,7 +303,7 @@ class StanzaDispatcher(Observable):
for handler_dict in self._handlers[xmlns][handler.name][specific]:
if handler_dict['func'] != handler.callback:
- return
+ continue
try:
self._handlers[xmlns][handler.name][specific].remove(
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/ba85a309e21e6a19e5949e8a…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/ba85a309e21e6a19e5949e8a…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
78d8015b by lovetox at 2020-05-02T09:22:10+02:00
Remove unused code
- - - - -
1 changed file:
- gajim/plugins/pluginmanager.py
Changes:
=====================================
gajim/plugins/pluginmanager.py
=====================================
@@ -426,8 +426,6 @@ class PluginManager(metaclass=Singleton):
# So just unregister the plugin handlers
if con.handlers_registered:
for handler in instance.handlers:
- if len(handler) > 4:
- handler = handler[:4]
con.connection.unregister_handler(handler)
def activate_plugin(self, plugin):
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/78d8015b716b616753138cb18adbda24…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/78d8015b716b616753138cb18adbda24…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
3b8fd415 by lovetox at 2020-05-01T23:09:27+02:00
DiscoInfo: Only handle type get
- - - - -
2 changed files:
- nbxmpp/modules/discovery.py
- nbxmpp/modules/entity_caps.py
Changes:
=====================================
nbxmpp/modules/discovery.py
=====================================
@@ -47,6 +47,7 @@ class Discovery(BaseModule):
self.handlers = [
StanzaHandler(name='iq',
callback=self._process_disco_info,
+ typ='get',
ns=Namespace.DISCO_INFO,
priority=90),
]
=====================================
nbxmpp/modules/entity_caps.py
=====================================
@@ -36,6 +36,7 @@ class EntityCaps(BaseModule):
priority=15),
StanzaHandler(name='iq',
callback=self._process_disco_info,
+ typ='get',
ns=Namespace.DISCO_INFO,
priority=20),
]
@@ -68,7 +69,7 @@ class EntityCaps(BaseModule):
for feature in self._caps.features:
query.addChild('feature', attrs={'var': feature})
- self._log.info('Respond with entity caps')
+ self._log.info('Respond with disco info')
client.send_stanza(iq)
raise NodeProcessed
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/3b8fd4157ed98750e32dbcfa…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/3b8fd4157ed98750e32dbcfa…
You're receiving this email because of your account on dev.gajim.org.