I want to find out if the player has a certain player tag("blocked") but I don't know how to get the player's tags in CloudScript. My code returns 1 for element.Tags.length. This is correct because the player has 1 tag. But element.Tags is always empty, it doesn't return the player's tag.
How can I get the player's tags when I call server.GetFriendsList? I need to find out if the player has a certain tag.
var result = server.GetFriendsList( { "PlayFabId":friendid, "ProfileConstraints": {"ShowTags":true } }); if ((result != null) && (result.Error == null)) { result.Friends.forEach(element => { if (element.FriendPlayFabId == currentPlayerId) { log.info("element.Tags.length: " + element.Tags.length + " " + element.Tags); if ((element.Tags.length > 0) && (friendblocked == false)) { element.Tags.forEach(tag => { log.info("current tag: " + tag); if (tag == "blocked") { friendblocked = true; } }); } } }); } else { log.info("error"); errorcode = result.Error; }