A way to filter strings without the author being in game

As a Roblox developer, it is currently impossible to safely show text from players not in game.

TextService:FilterStringAsync takes a user ID as opposed to a player, cool! However, it errors if the player is not in game. This means that in order to, for instance, have a social media feed in my game, I need to store the filtered texts inside the database. Roblox explicitly says this is not okay:

This method should be called once each time a user submits a message. Do not cache the results of this function and re-use them for separate messages. If a user submits the same text multiple times this method must be called again each time the message is sent. If the results are cached and reused spam detection and many forms of context-aware filtering will be broken and potentially put user safety at risk. Games that improperly use cached results may face moderation.

One example of this causing an issue is if people find a new filter bypass, which happens all the time, storing the results in database means that even if Roblox quickly fixes that issue, anyone who made a post with that filter bypass would not be filtered.

12 Likes

A use case would be players importing custom maps with textlabels. This prompted me to disable them outright due to there not being a way to filter a string from the servers end.

1 Like