As far as I can tell, there’s no StanzaBuilder.removeExtension()
method, parallel to the addExtension()
or overrideExtension()
methods.
I’m trying to convert code in Jitsi’s jicofo to the immutable-stanza model. Right now, it keeps track of the presence to be sent by remembering the last Presence stanza sent, and modifying it and re-sending it with a new stanzaId when something changes.
Obviously using a PresenceBuilder would be best for the new model, using something like xmppConnection.getStanzaFactory().buildPresenceStanzaFrom(lastPresence)
, but in cases where the existing code removes an extension from the presence stanza, I’d need to remove it from the builder instead.
As far as I can tell there’s no API to do that - can one be added?
(I’m looking at Smack 4.4.3 if that matters.)