I'm might be a bit slow here, so have patience :-) On Mon, Aug 17, 2009 at 9:25 AM, Bernd Fondermann<bernd.fonderm...@googlemail.com> wrote: > It's only that the server in general (with or without MUC doesn't > matter) doesn't currently handle directed presence stanzas from the > client. > Think of it as if it wouldn't handle unavailable stanzas. Then, MUC > wouldn't receive notice when a user goes offline. > > It works like this: > 1. Client sends presence to server ("outbound" in the notion if the RFCs). > 2. server (the client's server side session) handles the presence and > looks what to do with it > (in this case: it's directed presence => throw not implemented exception!) > 3. server routes the stanza (locally, to another client or to > component, or to another server). > even if it's only routing server-locally, the stanza is now "inbound". > 4. server handles "inbound" stanza and forwards to MUC.
When exiting a room (which would be the same thing as going offline in MUC), the client would send: <presence from='u...@vysper.org/res' to='r...@chat.vysper.org/nick' type='unavailable'/> This will be picked up by the MUC module, without going through the regular presence handling. Meaning, the stanzas would not go into step 2-4 above. Instead, the MUC module would get the stanza before 2 since it will get all stanzas destined for "chat.vysper.org". Maybe this is the wrong way, but I think it's the way it currently works. In addition to this, the MUC module needs to be informed of the users going offline without sending this stanza, e.g. the socket dying. This is currently not handled by MUC. /niklas