FriendInfo doesn't receive "IsInRoom" state of friends

Options
I use Photon Chat and PlayFab backend for friendlist.

When I create or join the room, other players see this room in the main Lobby and may connect to.
Now I trying to add Join Button next to the friend's name if he's waiting in the room.
This is room creating code:
public void CreateBattleRoom()
    {
        PhotonNetwork.AutomaticallySyncScene = true;

        RoomOptions ro = new RoomOptions();
        ro.IsOpen = true;
        ro.MaxPlayers = (byte)roomSize;

        if (friendsOnly.isOn)
            ro.IsVisible = false;
        else
            ro.IsVisible = true;

        PhotonNetwork.CreateRoom(roomName, ro, TypedLobby.Default);
}

To receive FriendInfo, I use the next callback:
public void FindFriends()
    {
        PhotonNetwork.FindFriends(CG.friendsID.ToArray());
    }

public override void OnFriendListUpdate(List<FriendInfo> friendList)
    {
        foreach (FriendInfo _info in friendList)
        {
            if (CG.friendListItemLUT.ContainsKey(_info.UserId))
            {
                CG.friendListItemLUT[_info.UserId].RefreshInfo(_info);
            }
        }
    }


Also, FriendInfo successfully receives UserID. But doesn't see current connections when I create/join the room:
public void RefreshInfo(FriendInfo info)
    {
        _info = info;

        Debug.Log("UserID: " + _info.UserId);  // Receive the "UserId" value 
        JoinButton.SetActive(_info.IsInRoom); // Not receive the "IsInRoom" value 
    }

So, I wait in an open room, but bool "IsInRoom" is always "False" and my "join button" hidden for all my friends, despite the fact that they check my condition through on their own "OnFriendListUpdate" callback.

Maybe I should pass my state parameters in "OnJoinedRoom" to FriendInfo manually?
Like this:
public override void OnJoinedRoom()
   {
        PhotonNetwork.GuysNowMyStateIsInRoomWithoutAnyJokes = true;
   }

Comments

  • Alex_el
    Options
    Also, try to create a room with "ro.PublishUserId = true;"
    But nothing has changed
  • Alex_el
    Options
    Solved, the problem in start players authentification