[ejabberd] Offline messages and priority

Holger Weiß holger at zedat.fu-berlin.de
Mon Feb 9 18:38:12 MSK 2015


* 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)?

> Do you want that dump from the client or server?

If your client supports logging the XMPP stream, that will be fine.

Holger


More information about the ejabberd mailing list