Random MatchMaking in Photon Chat

Options
OfreeHan
OfreeHan
edited June 2018 in Photon Chat
we are using unity for board game.We dont wanna use photon chat and realtime together.just a photon chat we wanna use it.
1- question - >
When users join the channel.We putting them to matchmaking channel after we matching users each other.My proplem when A-player left to game or disconnect photon chat still sending to message to A-player.I wanna put the outside of room to A-player or I wanna stop sending to message to A-player and stopping to matchmaking.

2- question - > if A-player disconnect and I use this code
public void OnDisconnected() {
		this.chatClient.SetOnlineStatus(ChatUserStatus.Offline);
}
How can I list online users.

I hope I canl tell the my proplem exactly.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited June 2018
    Options
    Hi @OfreeHan,

    Thank you for choosing Photon!

    1.

    User "A" needs to unsubscribe from "matchmaking" public channel.

    2.

    You can't list users in Photon Chat.
    You can only:

    - keep a cached list of users you received a message from per channel. (this is done already for you)
    - get notified of status updates of friends.

    So the little hack is to add everyone you encounter as friend using their UserId but this is also limited by the maximum number of friends (I think it can be 512 or 1024).
    Also don't forget to set yourself to online when connected if you want to (or to another status).
  • OfreeHan
    Options
    hi @JohnTube thanks for answer.