[ejabberd] Offline messages and priority

Raoul Duke rduke496 at gmail.com
Tue Feb 10 18:47:38 MSK 2015


On Mon, Feb 9, 2015 at 3:38 PM, Holger Weiß <holger at zedat.fu-berlin.de> wrote:
> * Raoul Duke <rduke496 at gmail.com> [2015-02-09 14:38]:
>> On Sun, Feb 8, 2015 at 9:56 PM, Holger Weiß <holger at zedat.fu-berlin.de> wrote:
>> > * Raoul Duke <rduke496 at gmail.com> [2015-02-08 03:22]:
>> >> I always want A to collect the offline messages (never B).
>> >>
>> >> Am I correct in thinking that setting a negative priority on Bs
>> >> session will accomplish that goal?
>>
>> It may have got lost in my overly-verbose question but I was wondering
>> if setting the priority on the clientside post-connect could result in
>> a race where the negative priority gets set after B has already
>> collected the offline messages and if there was any obvious way to
>> avoid that problem.
>
> The question didn't get lost, but a dump of the XMPP stream would
> probably answer it :-)
>
> From a quick look at the ejabberd code it seems like there's no such
> race.  Are you sure your client isn't sending a non-negative presence
> initially, or maybe a presence stanza without a priority value (in which
> case the priority would default to 0)?

It turns out the client was initially sending an empty presence
stanaza (<presence/>) followed by a subsequent one which explicitly
set the priority to -25.  So that seems like a likely culprit.  I'll
report back if that turns out to not be the case but I suspect it
will.

Thanks for the pointers.


More information about the ejabberd mailing list