How to show a private channel without sending the first message to?
Options
Alex_el
✭
in Photon Chat
Trying to create a private chat with a friend bases on "ChatGui.cs" in the PhotonChat tutorial.
I successfully send and see private messages by this:
The friend receives the channel "Player1:Player2", then "Hello" and all next messages.
But how to show a private channel without sending the first message?
Also trying:
But this creates a void channel. Friend doesn't receive this channel, because for him the name of this chat must be reverse order, like "Player2:Player1".
Do I need to think about how to link "Player1:Player2" & "Player2:Player1" channels without sending a message, or is there a more concise way?
I successfully send and see private messages by this:
ChatGui.chatClient.SendPrivateMessage(FriendName, "Hello");
The friend receives the channel "Player1:Player2", then "Hello" and all next messages.
But how to show a private channel without sending the first message?
Also trying:
public void ShowFriendChatHistory() { string friendChat = GamerName + ":" + FriendName; ChatGui.chatClient.Subscribe(friendChat); ChatGui.selectedChannelName = friendChat; ChatGui.ShowChannel(friendChat); }
But this creates a void channel. Friend doesn't receive this channel, because for him the name of this chat must be reverse order, like "Player2:Player1".
Do I need to think about how to link "Player1:Player2" & "Player2:Player1" channels without sending a message, or is there a more concise way?
0
Comments
-
Reposting ticket answer if anyone else is looking for answer:
Private channels are created/disposed automatically when first msg arrives/no subs left. We do not offer direct control on channel creation/disposal.
In your 2nd sample you are creating public channel - you can't set private channel name - it's generated automatically on server.
So if you wish to notify 2nd user about channel creation you should send them empty msg.1