cburschka / cadence

A strophe.js-powered XMPP web client for chatrooms.
6 stars 2 forks source link

Support XEP-0033 in room history. #412

Closed cburschka closed 8 years ago

cburschka commented 8 years ago

https://xmpp.org/extensions/xep-0033.html

The new ejabberd 16.04 release uses XEP-0033 to convey the original authors of room history messages, instead of writing these into the from attribute of the <delay> element. Cadence should look for both (preferring the former).

cburschka commented 8 years ago

Update: Never mind - the way that ejabberd used to do it is actually 100% bullshit and in violation of XEP-0045. This should no longer be supported.

Discussion history messages MUST be stamped with Delayed Delivery (XEP-0203) [14] information qualified by the 'urn:xmpp:delay' namespace to indicate that they are sent with delayed delivery and to specify the times at which they were originally sent. The 'from' attribute MUST be set to the JID of the room itself.

(Note: The 'urn:xmpp:delay' namespace defined in XEP-0203 supersedes the older 'jabber:x:delay' namespace defined in Legacy Delayed Delivery (XEP-0091) [15]; some implementations include both formats for backward compatibility.)

The service MUST send all discussion history messages before delivering the room subject and any "live" messages sent after the user enters the room. Note well that this means the room subject (and changes to the room subject prior to the current subject) are not part of the discussion history.

If the room is non-anonymous, the service MAY include an Extended Stanza Addressing (XEP-0033) [16] element that notes the original full JID of the sender by means of the "ofrom" address type: