[jdev] Echo outgoing chat messages back to myself

Daniel Dormont dan at greywallsoftware.com
Thu Jan 5 15:56:00 UTC 2012


Hmmm...I'm not seeing how that would work. Suppose user1 at mydomain/resource1a
sends

<message type="chat" to="user2 at mydomain"><body>hello user2</body></message>

Now, in order to make sure user1 at mydomain/resource1b also sees the message,
the original sender sends what? I was thinking something along the lines of:

<message type="echo" to="user1 at mydomain"><body>hello
user2</body><original-recipient>user2 at mydomain
</original-recipient></message>

Without that extra element, how's user1 at mydomain/resource1b supposed to
know who they're chatting with?

Dan

PS I just also discovered XEP-0033. I will see if I can use that. Ejabberd
definitely does not support XEP-0280.

On Thu, Jan 5, 2012 at 8:59 AM, Alexey Nezhdanov <snakeru at gmail.com> wrote:

> Just send stanza as is, no?
> You don't need any custom elements, all data is already there.
> On Jan 5, 2012 12:00 AM, "Daniel Dormont" <dan at greywallsoftware.com>
> wrote:
>
>> Hi XMPP-ers,
>>
>> I've noticed that certain clients (Gmail's web interface most notably)
>> automatically replicate my chat conversations in all windows I have open.
>> I'm wondering how to implement something similar using an XMPP client and
>> server. I control both client and server but don't want to make too many
>> custom modifications if I can help it. As a first step, the easiest thing
>> seems to be to send all messages to a bare JID rather than full JID. From
>> the user's standpoint this correctly causes all messages they receive to
>> appear everywhere.
>>
>> But what about sent messages? Is there a simple way to have messages I
>> (as a user) send echoed back to my other connected resources? Or should I
>> just send a second message to my own bare JID with some sort of custom
>> element that indicates it was really a message to someone else (and who
>> that someone else is)?
>>
>> thanks,
>> Dan
>>
>> _______________________________________________
>> JDev mailing list
>> Info: http://mail.jabber.org/mailman/listinfo/jdev
>> Unsubscribe: JDev-unsubscribe at jabber.org
>> _______________________________________________
>>
>>
> _______________________________________________
> JDev mailing list
> Info: http://mail.jabber.org/mailman/listinfo/jdev
> Unsubscribe: JDev-unsubscribe at jabber.org
> _______________________________________________
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.jabber.org/jdev/attachments/20120105/fec0a23d/attachment.htm>


More information about the JDev mailing list