[swift-users] Accessing stream:features in a swiften app

Kevin Smith kevin.smith at isode.com
Fri Dec 11 09:08:01 UTC 2020


Hi,

> On 31 Oct 2020, at 10:30, Matthieu Volat <mazhe at alkumuna.eu> wrote:
> I’d like to have a look at xep-0352 (client state indication) and later xep-0237 (roster versioning) in a swiften-based application, but server support for both these mechanisms is announced in the stream:features element that it seems I cannot really hook to in the Swift::Client class (can’t I?)… and there is no method either to check for those capabilities.
> 
> In which way would you retrieve stream:features in such a case? Using Swift::Client::onDataRead() to parse myself stanzas up to auth is not very elegant…

Swiften already supports roster versioning, so that bit’s covered. 

For 352 one would extend the StreamFeatures element (and parser/serialiser) to add suppport for that flag, and then probably expose this through Client.

/K


More information about the swift-users mailing list