powered by Jive Software

DelayInformation.from() should also check legacy namespace

When I fetch the delay info via DelayInformation.from(), it will only check for the XEP-0203 namespace. However, if I use DelayInformationManager.getDelayInformation(), it will check both the 0203 and the legacy 0091 namespace.

It would be great if the former function would also check for the legacy name and return that if available.

Furthermore, a message may contain multiple <delay> elements with different @from parameters, and it would be great if the function would try to get the delay without @from first (the one from the original message sender), and fall back to one with @from set.

It is a common Smack idiom that the static from(Stanza) methods found in a subclass of ExtensionElement extract the first exactly matching extension element of that type. That is the reason there exists also a higher level API DelayInformationManager.getDelayInformation() which will check for both. Is there any reason why this method does not work for you?

That behavior appears sensible. And it is exactly something one would put into a high level method like DelayInformationManager.getDelayInformation(). Patches welcome. :slight_smile:

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.