So you (the client) sent a message to a MUC and want to immediately
display it as "on the way" (good UX). Some time later (usually within
some seconds) you receive a message from the MUC which might or might
not be your sent message. You need to update the delivery status of your
sent message, so you have to match the reflection to what you sent.

Find out if a MUC message is your reflection, in seven really easy
steps! The message is your reflection if (not IFF):

1. you recently sent a message to the MUC, AND
2. the received message is from your participant JID, AND
   3. the XEP-0359 origin ID matches (probably not a transport) OR
   4. the message ID matches (a nice MUC, but not required by the XEP) OR
   5. the message body matches (not conclusive, some MUCs auto-pastebin) OR
   6. the received message is the first line of the sent message
      (IRC transports split multi-line messages into one-liners) OR
   7. the sent message is very long (>400 bytes) and the received
      message is a prefix of it (IRC transpors split very long
      one-liners too!)

(this mechanism doesn't cover MUCs which don't reflect the message ID
and do auto-pastebin. Screw them!)


Georg
-- 
|| http://op-co.de ++  GCS d--(++) s: a C+++ UL+++ !P L+++ !E W+++ N  ++
|| gpg: 0x962FD2DE ||  o? K- w---() O M V? PS+ PE-- Y++ PGP+ t+ 5 R+  ||
|| Ge0rG: euIRCnet ||  X(+++) tv+ b+(++) DI+++ D- G e++++ h- r++ y?   ||
++ IRCnet OFTC OPN ||_________________________________________________||

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Standards mailing list
Info: https://mail.jabber.org/mailman/listinfo/standards
Unsubscribe: standards-unsubscr...@xmpp.org
_______________________________________________

Reply via email to