help making private chat.

55 views
Skip to first unread message

Mina Adel

unread,
Jul 30, 2014, 10:54:30 AM7/30/14
to ape-p...@googlegroups.com
i need to know how to send message to only 1 user.
how can this done?
or how can i send the user pubid to other user? i really can't understand this please help me and thx all.
 :)

Louis Charette

unread,
Jul 30, 2014, 11:00:03 AM7/30/14
to ape-p...@googlegroups.com
Simply make the two users join a new channel (named "channel_user1_user2" for example) and the rest is the same as if the channel was public. 

Envoyé de mon iPhone
--
--
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to ape-p...@googlegroups.com
To unsubscribe from this group, send email to
ape-project...@googlegroups.com
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 unsubscribe from this group and stop receiving emails from it, send an email to ape-project...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mina Adel

unread,
Jul 30, 2014, 11:24:13 AM7/30/14
to ape-p...@googlegroups.com


Simply make the two users join a new channel (named "channel_user1_user2" for example) and the rest is the same as if the channel was public. 

Envoyé de mon iPhone
   

First thx for your fast reply.. and is there any other way without multi channel ? 
 

Louis Charette

unread,
Jul 30, 2014, 12:04:21 PM7/30/14
to ape-p...@googlegroups.com
You could send directly to a user using it's pubid (they are listed in the channel object or sent during onJoin event I think), but it's much simpler using a "dummy" channel as the channel will handle connection/de connection events. 

Envoyé de mon iPhone
--

Mina Adel

unread,
Jul 30, 2014, 12:13:54 PM7/30/14
to ape-p...@googlegroups.com
yes this what i need but i dont know how to get a user's pubid (the user i need how i know the user to get hi pubid ?? nickname? ?)
again thx for your fast reply and you helped me much.


You received this message because you are subscribed to a topic in the Google Groups "APE Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ape-project/deck13iW3_U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ape-project...@googlegroups.com.

Louis Charette

unread,
Jul 30, 2014, 8:37:14 PM7/30/14
to ape-p...@googlegroups.com
There’s not built in way to get a list of users or get a user based on his nickname. You need to manually built a list of pubid associated with the nicknames in a javascript object. You can do this using the « onJoin » event.

Something like this (Should be many examples on the Google Group) :

  1. client.addEvent('userJoin', function(user, pipe) {
  2. //Add the new user to the object
  3. userlist[user.properties.name] = user.pubid;
  4. });

  - Louis

Mina Adel

unread,
Jul 31, 2014, 2:41:03 AM7/31/14
to ape-p...@googlegroups.com
Thx for your help -Louis :)
Reply all
Reply to author
Forward
0 new messages