How to create the Private chat system with Photon Chat?
Options
in Photon Chat
I have almost done it but before showing the message it doesn't show the new messages.
if anyone has done the private chat system, please let me know how to do it.
Thank you...
if anyone has done the private chat system, please let me know how to do it.
Thank you...
0
Best Answer
-
To send private message:
chatClient.SendPrivateMessage(TargetUserId, message);
To recieve private message:public class ChatClient : IChatClientListener { public void OnPrivateMessage(string sender, object message, string channelName ) { }
5
Answers
-
Hi @Albertkaruna,
Thank you for choosing Photon!
I don't understand what is the issue here.
Photon Chat allow you to send private messages from a single user to a single user using a single method call.0 -
I was tried but it wasn't working.
If you got any sample code, please show me that.
How to add players to private channel?0 -
Photon "private channels" can have only two users.
You can use "public channels" with a name shared between few users (more than 2) so it work as "private channels" others can't see/subscribe to unless they guess the name.0 -
I've tried to use the private chat but still, i can't get the result. The examples that you're given doesn't have any examples for a private chat. So, please give me some example code.
Thank you.0 -
To send private message:
chatClient.SendPrivateMessage(TargetUserId, message);
To recieve private message:public class ChatClient : IChatClientListener { public void OnPrivateMessage(string sender, object message, string channelName ) { }
5 -
Thank you @JohnTube . Now it's working fine.0
-
hi...
is it possible to get TargetUserId ? I want all user ids who is connected.
Thanks in advance....!0