When creating a plan for my experience I came across a major issue. My experience will allow players to start ‘chats’ with specific players of their choice even if the other player is not in the current server. These ‘chats’ will be filtered using the text filter using broadcast level filtering.
Now the issue comes with the fact that I must use Chat:CanUsersChatAsync iirc which requires both users to be in the current server, which will most likely not be the case. Are there any solutions to my problem?
The arguments call for both user’s ids, so I suspect that wouldn’t be the case. It doesn’t say in the documentation that both players are required to be in the same server, but if you’re still skeptical you could always test it in a live game with an alternate account.
Maybe have a “Chat request” system and if Player1 sends chat request to Player2, if Player2 presses “accept” then check if they can chat. You can also store in a DS if each player can chat, maybe check that each time the game loads, this way you only use the function when the player is in-game (the only time they will actually see any messages) and you can check their DS value when they’re offline.
Really strange undocumented functionality. In that case, you might have to rely only on Chat:CanUserChatAsync, which unfortunately allows blocked players to communicate with the receiver (if you’re not doing the checks yourself), and possibly restrict people who can only talk to select players.
I can already check if a player has blocked a specific player, the problem comes in with the fact on whether Roblox will allow me to use this function instead?
If you’re using MessagingService for your cross-server chat system, it’s possible to check on Server1 if Person1 can chat, and on Server2 if Person2 can chat with Chat:CanUserChatAsync (assuming that this method has the same players-in-server-only functionality).
I understand how I can do this, however the question is if Roblox will allow me to do this since for all we know the functions could be entirely different.
I highly doubt it would be a problem to use the function I mentioned over the function you mentioned in the op; Roblox won’t want people who have their chat disabled to be able to talk to others, and both methods prevent that. Just the first one provides extra checks for people who are blocked, and for people who have chat restricted to Friends / Friends + Following / Friends + Following + Followers only.