Hello,
While iterating on our MAM for MUC server-side implementation, we
reached an issue on the following part of the XEP.
1. from in MUC archive:
"When sending out the archives to a requesting client, the 'to' of the
forwarded stanza MUST be empty, and the 'from' MUST be the occupant JID
of the sender of the archived message."
The original issue is that you cannot display the remote history as you
would do with local history because:
- On local history, you will have nickname, we are missing it here.
- On local history (or during live chat while online) we may not have
access to the real jid.
We thus think that we need in some way include the room nick in the
message and only include the real JID if you have the right to access
it, to preserve the anonymous behaviour of the room. XEP-0045 says:
"However, the MUC service MUST NOT reveal the sender's real JID to the
recipient at any time, nor reveal the recipient's real JID to the
sender." It is in IQ section, but this is a good general principle.
So, I think it may be interesting and more flexible to state that the
from attribute will contain the room/nick JID and to add a special tag
for real JID. For consistency, we can reuse the same approach we have
for presence on non-anonymous room: x tag with xmlns
http://jabber.org/protocol/muc#user
An example archive message could be:
<message id='iasd208' from='co...@chat.shakespeare.lit'
to='jul...@capulet.lit/chamber'>
<result xmlns='urn:xmpp:mam:0' queryid='g28' id='28482-20987-73623'>
<forwarded xmlns='urn:xmpp:forward:0'>
<delay xmlns='urn:xmpp:delay' stamp='2010-07-10T23:08:25Z'/>
<message xmlns="jabber:client"
from='co...@chat.shakespeare.lit/secondwitch' type='groupchat'>
<body>Thrice and once the hedge-pig whined.</body>
<x xmlns='http://jabber.org/protocol/muc#user'>
<item jid='ha...@shakespeare.lit/pda' />
</x>
</message>
</forwarded>
</result>
</message>
Forgive the Shakespeare mashup and inconsistencies :)
Another more compact approach, implies putting the real from somewhere
else. Example if we include such semantic on the forwarded tag (it would
require changing spec for 'urn:xmpp:forward:0', maybe not ok, so just an
example):
<message id='iasd208' from='co...@chat.shakespeare.lit'
to='jul...@capulet.lit/chamber'>
<result xmlns='urn:xmpp:mam:0' queryid='g28' id='28482-20987-73623'>
<forwarded xmlns='urn:xmpp:forward:0'
real-from="ha...@shakespeare.lit/pda">
<delay xmlns='urn:xmpp:delay' stamp='2010-07-10T23:08:25Z'/>
<message xmlns="jabber:client"
from='co...@chat.shakespeare.lit/secondwitch' type='groupchat'>
<body>Thrice and once the hedge-pig whined.</body>
</message>
</forwarded>
</result>
</message>
2. Filtering
Regarding filtering, the criteria of the with attribute may also need to
be clarified. As of now, it seems to be real JID of the sender. That
case is clearly interesting for admin user, investigating abuse, but I
think this parameter should alternatively (even primarily) accept the
room/nick criteria.
How does it sounds ?
Do you see other way for solving original issue ?
Thanks !
--
Mickaël Rémond
http://www.process-one.net