Philipp Hörist pushed to branch master at gajim / python-nbxmpp


Commits:
0edd032c by Philipp Hörist at 2023-11-08T18:12:41+01:00
fix: Websocket: Set user agent

Fixes #132

- - - - -


1 changed file:

- nbxmpp/websocket.py


Changes:

=====================================
nbxmpp/websocket.py
=====================================
@@ -21,6 +21,7 @@ from gi.repository import Soup
 from gi.repository import GLib
 from gi.repository import Gio
 
+import nbxmpp
 from nbxmpp.const import TCPState
 from nbxmpp.util import get_websocket_close_string
 from nbxmpp.util import convert_tls_error_flags
@@ -34,6 +35,7 @@ class WebsocketConnection(Connection):
         Connection.__init__(self, *args, **kwargs)
 
         self._session = Soup.Session()
+        self._session.set_user_agent(f'nbxmpp {nbxmpp.__version__}')
 
         if self._log.getEffectiveLevel() == logging.INFO:
             self._session.add_feature(



View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/0edd032cc232046daf2203b6f48f8be83509b4fb

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/0edd032cc232046daf2203b6f48f8be83509b4fb
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to