[jdev] MUC Presence: force history even if already joined
Waqas Hussain
waqas20 at gmail.com
Wed Mar 26 20:58:02 UTC 2014
On Wed, Mar 26, 2014 at 2:05 PM, Dave Cridland <dave at cridland.net> wrote:
>
> On 26 Mar 2014 17:49, "Daniel Dormont" <dan at greywallsoftware.com> wrote:
>> I have a use case where I would like to send a presence to a MUC that
>> I may have already joined and, even if I have, I want it to send me
>> the message history no matter what. Is there a way to do that or would
>> it require a protocol extension of some sort?
>
> Yes and no.
>
> Technically speaking, simply sending presence to a MUC and joining (thus
> getting the history and participants) are not the same thing. Sending a
> proper MUC join (with the <x/> and the history control optionally inside it)
> to M-Link[*] will, therefore, give you the history you asked for, and all
> the occupant presence, even if you're already in the room.
>
> I find this *extremely* useful - which is why I did things that way. A
> use-case for this is where an S2S link is down when you reconnect your C2S,
> or the server crashes, or ... - all arguably edge cases, but they're solved
> very nicely this way.
>
> Other servers don't do this, though - I think they should.
>
> If you wanted to avoid the occupant presence, you'd want an extension which
> signalled this in much the same way that the history controls work.
>
> Dave.
> --
> * - Note that I left Isode over a year ago and so may well be out of date.
>
Prosody was (AFAIK) the first server to do this. We specifically
checked for <x xmlns=muc>, and assumed it was a MUC join, even if the
user was already in the room. It worked wonderfully, but we had to
comment that out because of Gtalk resending directed presence every
few minutes.
Did Google ever fix that? Or do Gtalk users joining M-Link chatrooms
get history sent over and over? We never removed the code from Prosody
in the hope that Google would fix their behavior and we would reenable
the feature.
--
Waqas Hussain
More information about the JDev
mailing list