Niklas Gustavsson wrote: > Hi > > On hacking a bit on Vysper, I got some random thoughts: > * How about making MessageStanza.getSubjects() and > MessageStanza.getBodies() return a Map<String, String> rather than > Map<String, XMLElement>? Looking at the XML schema for <message>, it > seems that body and subject elements can only contain text.
the XML schemas are not normative. rather, body elements can actually contain XML, see http://xmpp.org/extensions/xep-0071.html > * Should we add a StanzaBuilder.createMessageStanza() that takes > Map<String, String> for subjects and bodies? we could. but where do we actually create pristine message stanzas? > * Also, how about adding a StanzaBuilder.createMessageStanza() that > takes a Delay object for adding a delay element? What would be the use case, MUC history? When I think about Delayed Delivery[1,2], I think of a some special runtime service code which is responsible for + adding delay elements to stanzas + pruging stanzas which have expired + storing them (serialization) + unserializing them + putting them on the wire Right now, I think it's making sense to encapsulate this. Bernd [1] http://xmpp.org/extensions/xep-0203.html [2] http://xmpp.org/extensions/xep-0160.html
