python-nbxmpp merge requestshttps://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests2024-03-25T16:37:43Zhttps://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/86Discovery: implement XEP-0215: External Service Discovery2024-03-25T16:37:43ZIvan ShapovalovDiscovery: implement XEP-0215: External Service Discoveryhttps://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/84feat: MDS2024-03-28T06:01:53ZNicocofeat: MDSReferences: https://dev.gajim.org/gajim/gajim/-/issues/11785References: https://dev.gajim.org/gajim/gajim/-/issues/11785https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/83In this commit there is a patch for the exception2024-03-13T06:30:25ZPaoloP79In this commit there is a patch for the exceptionTraceback (most recent call last):
File "/home/prova/git-projects/gajim-devel/python-nbxmpp/nbxmpp/dispatcher.py", line 475, in dispatch
handler['func'](self._client, stanza, properties)
File "/home/prova/git-projects/gajim-devel...Traceback (most recent call last):
File "/home/prova/git-projects/gajim-devel/python-nbxmpp/nbxmpp/dispatcher.py", line 475, in dispatch
handler['func'](self._client, stanza, properties)
File "/home/prova/git-projects/gajim-devel/python-nbxmpp/nbxmpp/modules/ibb.py", line 49, in _process_ibb
properties.ibb = self._parse_open(stanza, open_)
File "/home/prova/git-projects/gajim-devel/python-nbxmpp/nbxmpp/modules/ibb.py", line 89, in _parse_open
return IBBData(type='open', block_size=block_size, sid=sid)
TypeError: IBBData.__new__() missing 2 required positional arguments: 'seq' and 'data'https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/82feat: XEP-0424 (Message Retraction)2024-02-15T18:18:47ZNicocofeat: XEP-0424 (Message Retraction)https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/80feat: XEP-0317 (Hats)2024-03-28T06:03:05ZNicocofeat: XEP-0317 (Hats)Basic support for [hats](https://xmpp.org/extensions/xep-0317.html)Basic support for [hats](https://xmpp.org/extensions/xep-0317.html)https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/79feat: Parse XEP-0172 nickname in MUC presences2024-03-28T06:03:15ZNicocofeat: Parse XEP-0172 nickname in MUC presencesThis is something that [Cheogram](https://wiki.soprani.ca/CheogramApp/Nickname) and slidge have implemented for a while, as a workaround to allow in MUC nicknames some code points (mainly emojis) that are forbidden in resource parts.This is something that [Cheogram](https://wiki.soprani.ca/CheogramApp/Nickname) and slidge have implemented for a while, as a workaround to allow in MUC nicknames some code points (mainly emojis) that are forbidden in resource parts.https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/78Remove deprecated 'code' attribute usage2023-12-22T11:08:09ZLink MauveRemove deprecated 'code' attribute usageThis attribute was defined in XEP-0086, which is deprecated since 2007, and which was spun off from RFC3920. Let’s stop including it so that other entities don’t need to support it any longer. :)
The docstring of `Protocol.getErrorType...This attribute was defined in XEP-0086, which is deprecated since 2007, and which was spun off from RFC3920. Let’s stop including it so that other entities don’t need to support it any longer. :)
The docstring of `Protocol.getErrorType()` has been fixed too.https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/71Draft: feat: XEP-0478: Stream Limits Advertisement2023-05-08T14:28:26ZmjkDraft: feat: XEP-0478: Stream Limits AdvertisementImplements https://xmpp.org/extensions/xep-0478.html, namely:
* Parses and exposes stream limits values via methods of `Features` class
* Checks elements against the size limit before sending in `Connection.send` implementations
Allows...Implements https://xmpp.org/extensions/xep-0478.html, namely:
* Parses and exposes stream limits values via methods of `Features` class
* Checks elements against the size limit before sending in `Connection.send` implementations
Allows applications (*the* application, heh) to be less conservative in uploaded avatar sizes and... that's it, basically. :D
Other changes:
* Some (preliminary) typing is added and variables renamed here and there, mainly to make the changes more clear but also to document existing behavior.
* An unintended consequence is that `data-sent` event now sends `bytes` instead of `Node`. This change wasn't strictly necessary, but keeping the old way would've required storing stanzas in the queue in both, serialized and node form. ~I haven't find any subscribers to this event in nbxmpp or Gajim. Haven't looked at plugins though.~ Derp, I didn't search for `stanza-sent` in Gajim. The type change actually broke XML console, lol. I see it doesn't use the node structure at all, and with a tiny change it works with `bytes`... but I think it'd be a code quality improvement if the event argument is made strictly a `Node` in the future, so I guess I'll have to store both forms of data in the queue.
I tested this briefly with an artificial limit of 800 bytes. There only was a traceback from the omemo module trying to publish 10 KB of bundles... which seems not to be a fatal error for omemo. :shrug:
TODO:
- [x] Factor out the size check
- [x] ~Add the check to WebsocketConnection.send~ (obsolete)
- [x] Revert the change of `data-sent` event argument type
- [ ] Test avatar publishing
- [ ] Test with a server that actually advertises the limits!https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/70feat: Add function to parse XMPP IRI queries2023-05-25T08:30:23Zmjkfeat: Add function to parse XMPP IRI queriesMoved from Gajim helpers, basically changing only the returned dict to a list of pairs.
The permissiveness in parsing is kept, for now.Moved from Gajim helpers, basically changing only the returned dict to a list of pairs.
The permissiveness in parsing is kept, for now.https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/41Type Bookmarks, PubSub and Util2020-04-20T16:39:40ZLink MauveType Bookmarks, PubSub and UtilThese require !40 to not give errors around `Node` usage.These require !40 to not give errors around `Node` usage.https://dev.gajim.org/gajim/python-nbxmpp/-/merge_requests/39Parse booleans according to the xs:boolean spec2020-05-20T18:24:46ZLink MauveParse booleans according to the xs:boolean spec'True', 'False' or '' aren’t valid values.
Also use this helper in more locations.'True', 'False' or '' aren’t valid values.
Also use this helper in more locations.