I'm making a chat in which players can start chat conversations with specific friends.
So far I've understood that I need to use cloud-scripts for my server side code and for clients to communicate with each other I need to have them modify data in the play-fab server. Here is the plan I have for clients to make initial contact with each other and start a shared group data.
To first initiate a conversation :
A client will call a cloud script that will have the function SetObjects with the SetObjects function I want to add the clients userId to a list in the data of the user the client is attempting to contact.
Then to receive the chat request:
clients will be calling every second a cloud script that will have the GetObjects function and check the content of the list, if the list is not empty the client will be able to go through the list and accept or refuse to start a conversation with each of the users that tried to start a conversation with the client in the list.
So i guess my question is generally speaking is the approach good and if it is how can add to a list in the data of a user.
Here is the info I saw concerning entity.SetObjects:
I could use GetObjects to get the list add the current username then store the new list with SetObjects but maybe their is a more optimal approach.
also I'm always confused as to why when I search the api for a function I get information on a HTTP request version but then I see here and there snippets of code that can do the job with out a HTTP request like for example here is the SetObjects object function:
Any help will be very appreciated.