On Mon, Aug 17, 2009 at 08:48, Niklas Gustavsson<nik...@protocol7.com> wrote:
> On Mon, Aug 17, 2009 at 7:04 AM, Bernd
> Fondermann<bernd.fonderm...@googlemail.com> wrote:
>> Yes, MUC is definitively effected.
>> I'm not talking about the MUC code receiving a presence stanza from a client.
>> (BTW, your use of "messages" is ambivalent. do you mean 'message
>> stanza' or 'stanza' in general?)
>
> Yeah, I meant stanza in general.
>
>> I'm talking about the server receiving a presence stanza from its
>> client which is then to be routed to the server as a 'directed
>> presence'.
>>
>> The server needs to take special care and keep track of directed
>> presences. Everytime the presence get's an update, it must be
>> propagated to the receivers of directed presence, including
>> unavailable presences. This handling is not currently done in Vysper
>> and since there is no federation possible with other servers, you will
>> never be able to enter a MUC room with a 'regular client'.
>
> If we for the moment exclude the case of running MUC as a separate
> component (talking with the main server over XMPP). This I have not
> looked into at all since there is no support for this in general today
> (federation, component protocol and as you say, directed presence).
>
> So, right now I'm running MUC within the server, but only "listening"
> for stanzas for a subdomain (using the SubdomainNamespaceHandler).
> This case seems to work, at least when using the MUC support in Smack
> (I have not tested this with other clients, a topic of an upcoming
> mail :-). So, a user can setup Vysper on example.com and setup MUC to
> run in the server, subscribing to stanzas on chat.example.com.
>
> But, I might have understood all of this completely wrong, so I would
> certainly appriciate if you could have a look at the integration test
> case. I just now committed it:
> org.apache.vysper.xmpp.modules.extension.xep0045_muc.inttest.MUCIntegrationTestCase

There is nothing wrong with MUC.

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.

Unfortunately, and that's a lesson I learned the very, very hard way,
it's impossible to handle "outbound" and "inbound" stanzas in one
handler.

As you might have seen now is that oubound directed presence is not
handled currently.
Inbound directed presence should work fine.

  Bernd

Reply via email to