Opengraph support
This MR introduces support for opengraph data embedded in message stanzas. Since this is not XEP'd, I based it on the example from the Cheogram wiki, and 2 more examples I captured while experimenting with Cheogram.
Support for namespace prefix definition is present but limited in the nbxmpp parser. The first commit correctly parses the Cheogram wiki example, by adding a Node.getNamespacedAttr()
method. Unless I missed something, this addition is required to parse the example. Maybe this is enough but…
In a second commit, I improved support for prefix namespace definitions, notably when the prefix namespace definition lies in the parent of a Forget it, it's actually not needed.Node
. This is more "XML valid", but required adding some new methods in Node
and some extra complexity in the getName()
and getNamespace()
methods. I don't have a clear picture of how this impacts performance. Maybe we actually don't want that extra complexity/parsing overhead and using just the first commit is fine. Maybe I implemented it wrong, and we can do it in a better way. @lovetox, let me know your thoughts about it, whenever you feel like it having a look at this, obviously, no hurry.
References: gajim!1199 (closed)