qxmpp icon indicating copy to clipboard operation
qxmpp copied to clipboard

Missing by attribute for delayed delivery in QXmppMessage

Open LightZam opened this issue 10 years ago • 6 comments

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>

LightZam avatar Jan 09 '15 09:01 LightZam

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)?

0xd34df00d avatar Jan 09 '15 11:01 0xd34df00d

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.

LightZam avatar Jan 09 '15 14:01 LightZam

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

LightZam avatar Jan 12 '15 05:01 LightZam

The issue with the docs should be fixed http://doc.qxmpp.org/

jlaine avatar Jan 12 '15 09:01 jlaine

I don't understand this issue, is this a MUC issue or a delayed delivery issue?

jlaine avatar Sep 02 '15 18:09 jlaine

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.

LightZam avatar Sep 03 '15 11:09 LightZam