Using OnPrivateMessage - string sender

I'm trying to build a simple messaging system. I've got it down to the point where I can Send and Receive private messages on the OnPrivateMessage callback.

My problem is that 'sender' is basically an ID, "8343be34-dae3-435a-8a60-3de023649910"

Does anyone know how to turn this information into something more tangible?
I've looked at the Photon Chat documentation but it has nearly no information on what this ID is or how to get the sender's nickname from it.

Comments

  • Hi @AaronL,

    Thank you for choosing Photon!

    As I can see you are getting GUIDs from the Photon server as Photon Chat client UserId since you do not specify any explicitly or use custom authentication, try setting the Photon Chat client's UserId before connecting to a Nickname of your choice and see if it helps. Read more about Chat "UserIDs and Friends".
    Or, if you want to have UserId and Nickname separately, take a look at these two workarounds here.
  • I'm not sure that the Photon Chat friends are what I'm looking for.

    I'm trying to make a simple permanent friends list where if you click on a name it invites the user to a room.

    So far I have the ability to maintain a PlayFab friends list,
    Since PlayFab does some blackbox magic and authenticates with Photon, it's convenient that the UserID's are the same.

    I'm just missing the step to be able to send a Photon Chat message to a user based on their PhotonNetwork UserID. Have you had experience with that?
  • JohnTubeJohnTube mod
    edited December 7
    I'm just missing the step to be able to send a Photon Chat message to a user based on their PhotonNetwork UserID. Have you had experience with that?
    Well since you use PlayFab and custom authentication for PUN and Photon Chat you should have the same UserId/PlayFabId in PUN and in Photon Chat. So if both users are connected they can exchange private messages using their UserId/PlayFabId or exchange messages when subscribed to the same public chat channel.
    Make sure both clients are on the same server though, read our "Matchmaking Checklist" carefully.
Sign In or Register to comment.