0

I am observing that from attribute of delay element in MUC history message has JID of the occupant instead of room.

As per xmpp.org/extensions/xep-0045.html#enter-history:

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.

RoomJID = testGroup@conference.example.com
Occupant 1 = erik@example.com/desktop
Occupant 2 = cyrus@example.com/desktop


<?xml version="1.0" encoding="UTF-8"?>
<message xmlns="jabber:client" from="testGroup@conference.example.com/cyrus" to="erik@example.com/desktop" type="groupchat">
   <body>Hi</body>
   <thread>B9D31734-606D-43CD-B613-D5FF8DF7CAA3</thread>
   <subject />
   <active xmlns="http://jabber.org/protocol/chatstates" />
   <delay xmlns="urn:xmpp:delay" from="cyrus@example.com/desktop" stamp="2015-03-08T21:02:42.481Z" />
   <x xmlns="jabber:x:delay" from="cyrus@example.com/desktop" stamp="20150308T21:02:42" />
</message>

Why is it set to the JID of occupant instead of JID of room? Please help me understand.

Mickaël Rémond
  • 9,035
  • 1
  • 24
  • 44
GJain
  • 5,025
  • 6
  • 48
  • 82

1 Answers1

2

It depends if you configured your room as anonymous or not. Configure that room as anonymous and it will behave as you expect.

The behaviour you mention is from XEP-0045 v1.25. For non-anonymous room the original from field should be defined with Extended Stanza Addressing.

Changes are not yet supported, but there are work in progress: https://github.com/processone/ejabberd/issues/465

Mickaël Rémond
  • 9,035
  • 1
  • 24
  • 44
  • my room is members-only...so it is non-anonymous....I need to have members-only....can not support anonymous yet...also I did not quite understand your second line/paragraph...please elaborate – GJain Mar 09 '15 at 08:20
  • I mean, mod muc is not yet adapted to latest XEP version, but it will come someday. – Mickaël Rémond Mar 09 '15 at 10:56
  • Thank you so much for clarifications – GJain Mar 09 '15 at 17:56