TextService:FilterStringAsync limitation causes unwanted (and unintended?) behaviour without an alternative

Before I explain the issue, it’s in place to provide some context on our use-case, keeping in mind (one of) the use-case for this method;
A game that connects to an external web server to fetch content that is displayed in-game. Often you will not have control over the content of the external site and a third party can edit the information.

We use the OpenCloud universe messaging service, for an external moderation dashboard so our moderators can continue moderating the game, and sanction bad actors, without having to first join the Roblox game.
When a bad actor is punished, banned for example, the ban reason is then displayed globally to help make others aware of our rules, and how they should behave, amongst other things.

To ensure this text is compatible for all age groups/users in our game, we (as required) abide by the standards which require text filtering; TextService:FilterStringAsync():GetNonChatStringForBroadcastAsync()

This has always been working perfectly, however we’ve just noticed it started outputting the following error message:

“The sender must be connected to the current server”

After searching through the docs, we found an obscure note: “This method currently throws if fromUserId is not online on the current server.” — explaining what the issue was.
Doing a quick search on the DevForum looking to solve this issue, we noticed many other creators have been facing this issue, and there basically is no solution to this.

Why? Because all other text filtering features also require this condition, or only accept a Player instance — something which isn’t possible for our use case.

This doesn’t seem like intended behaviour, seeing as the intended goal according to the documentation, for this method (in combination with the OpenCloud MessagingService) is a Moderation System, and Announcement Portal, amongst others.

Expected behavior

It should not throw the “The sender must be connected to the current server” error when using this method, as the goal is to be able to use a UserId rather than an in-server Player Instance.

A private message is associated with this bug report

2 Likes

Hello! Thank you for your report. It is intended that TextService:FilterStringAsync only work with players in the server. Please let us know if you run into any other issues!

Hey, thanks for the reply.

  • If it’s intended to require it to be a player currently in the server, what should we use for our use-case then? (That being an external moderation dashboard / sending a moderation reason from the dashboard via MessagingService to the game)
  • What caused the update suddenly making it a requirement, when previously it was the only function allowing this to work without the player being in the server?

Looking forward to your insights!