qxmpp
qxmpp copied to clipboard
Missing by attribute for delayed delivery in QXmppMessage
it will be a problem when i need the user who send the message from groupchat and QXmppMessage do the delayed delivery like below
QXmppMessage.cpp
// XEP-0203: Delayed Delivery
xmlWriter->writeStartElement("delay");
xmlWriter->writeAttribute("xmlns", ns_delayed_delivery);
helperToXmlAddAttribute(xmlWriter, "stamp", QXmppUtils::datetimeToString(utcStamp));
xmlWriter->writeEndElement();
this is XEP-203 would look like
in groupchat, the jid will be the groupJid not userJid, so there is problem when you not parse the delay tag's from attribute, if you agree with my opinion, i would make a pull request.
XEP-203 - Receiving Cached Messages from a Conference Room
// example 3
<message
from='[email protected]/secondwitch'
to='[email protected]/laptop'
type='groupchat'>
<body>
By the pricking of my thumbs,
Something wicked this way comes.
Open, locks,
Whoever knocks!
</body>
<delay xmlns='urn:xmpp:delay'
from='[email protected]'
stamp='2002-09-10T23:05:37Z'/>
</message>
I may have misunderstood your opinion, but doesn't the from
attribute of
the message itself contain what you want? Particularly, it still has both
the MUC room JID (before the slash) and the nick (after the slash,
secondwitch
in this case)?
i need both user jid and muc room jid, because i need to know who post the message in muc room. the jid will help me get extra info e.g. user's photo.
and in other way to say, xep-0023 declares 'from' attribute is recommend to implement. so it will not a bad thing to parse it.
oh by the way, i want to remind you about the qxmpp markdown file, the document url needed upload, it confused me few days to found out the latest is down, and i had to switch http://doc.qxmpp.org/qxmpp-0.8.0
The issue with the docs should be fixed http://doc.qxmpp.org/
I don't understand this issue, is this a MUC issue or a delayed delivery issue?
i guess it belong to delayed delivery issue, the sample xml from XEP-0203 show
<delay xmlns='urn:xmpp:delay'
from='[email protected]'
stamp='2002-09-10T23:05:37Z'/>
but QXMPP didn't has from attribute.