Ok, i think i understood what's happening.
If i use sessions, the client uses the same session in every tab/
window opened. So it is "normal" that a message posted in room 1 is
transmitted and shown in room 2, too. On the other hand, if i disable
sessions, even if a same user is logged in two different rooms, it has
two different pubids; so, while the "public" messaging works as it
should, the personal message system is messed up because of this
"double identity" of the same user.
Trying to manage this situation... i hope i'm able to fix it.

Any suggestion?

On 8 Feb, 11:26, Giuseppe Mastrandrea <[email protected]>
wrote:
> Honestly, i'm trying to avoid the way you suggest, as i don't want a
> client can receive messages from a channel he's not logged in.
> And, another weird thing, if i just disable sessions from the client,
> everything works as it should. Veeeery strange :-)
>
> On 7 Feb, 19:11, Louis Charette <[email protected]> wrote:
>
>
>
>
>
>
>
> > I just tested on my chat system and the messages are only sent to the 
> > channel it's intended for. I don't have separate room on different page (I 
> > use Jquery UI tabs, one for each room the user is connected to). Again, 
> > maybe it's because you're using the APE sessions...
>
> > You could do the same thing as with the userJoin: When you receive a raw, 
> > you check the "pipe.name" property to see if it's intended for the current 
> > channel or not.
>
> >    - Louis
>
> > Le 2012-02-07 à 12:45, Giuseppe Mastrandrea a écrit :
>
> > > Yeah, Louis, that's the situation i'm trying to recreate, and the
> > > reason why i just can't hook a userLeft on JOIN command.
> > > Another weird thing: when i've got a user connected on two different
> > > rooms (for example, in different tabs of the browser), and i type a
> > > message in one room, it automatically is shown in the other room, too!
> > > Seems like the following lines:
>
> > > var chan = Ape.getChannelByName(params.channel);
>
> > > if (!$defined(chan)) return ["401", "UNKNOWN_CHANNEL"];
> > > chan.pipe.sendRaw(params.raw, params.data);
>
> > > in inlinepush.js are not doing their job; the 'postmsg' raw, that is
> > > the one launched when a user posts a public message, is sent to both
> > > rooms.
>
> > > On 7 Feb, 18:38, Louis Charette <[email protected]> wrote:
> > >> Le 2012-02-07 à 11:40, [email protected] a écrit :
>
> > >>> What you could do is create a hook on the JOIN command which would fire 
> > >>> userLeft in all  other rooms the user is part of but the one joining
>
> > >> What if the same user want to be connected to the two chat in two 
> > >> different tabs?
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "APE Project" group.
> > > To post to this group, send email to [email protected]
> > > To unsubscribe from this group, send email to
> > > [email protected]
> > > For more options, visit this group at
> > >http://groups.google.com/group/ape-project?hl=en
> > > ---
> > > APE Project (Ajax Push Engine)
> > > Official website :http://www.ape-project.org/
> > > Git Hub :http://github.com/APE-Project/

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to