Move to the new chat filter function - FilterStringAsync - by June 15

The new text filtering function ‘FilterStringAsync’ is designed to make fewer calls to the filter service than FilterStringForPlayerAsync, and be generally easier to implement. Fewer calls will result in less lag and overhead for your game, and less traffic overall for our servers and services.

This function takes care of filtering for the different age brackets and displaying the correct text to the receiving users. You do not need to manage or track the user’s age for filtering purposes. It also caches common strings typed by the user to reduce calls.

We will be deprecating FilterStringForPlayerAsync next month, aiming for June 15. If you have a custom chat GUI in your game now, please update to use FilterStringAsync as soon as possible.

Use Notes
This function can be used for any user entered text string, such as house names or RP names. When being used for non-chat communication (for example, a player setting the name of their house), you should use the filter with the writing player as both the sender and receiver and save the filtered string.

You do not need to send game announcements to this filter. For example, “Username entered the server” or “User1 was killed by User2” type messages. You only need to send text entered by users.

Documentation

21 Likes

Does it download ROBLOX’s chat filters only once (on startup) and make no web requests after that point? Or does it still make requests occasionally, but not on every message (e.g. only on < 13 senders)?

4 Likes

It still makes web requests, but it goes through our new chat backend that uses Community Sift. It’s meant to provide smarter filtering than our previous chat filter (which obviously wasn’t great for under 13 users). You provide two players now (the source and destination players) which help the internal filtering algorithms.

It’ll also cache any requests possible, so overall performance (if doing a chatroom where everyone sees everyone else’s posts) should stay the same.

7 Likes

Wow, that looks pretty nifty. Are you guys using the anti-bullying/bigotry/fraud parts of it too? If so, that’s a major improvement over just a profanity/personal info filter.

Yeah, the platform does some semantic analysis so it seems to have a general idea what goes on in every message. It specifically filters out what you mentioned, and some more specific stuff for under 13 accounts (personal info, etc).

3 Likes

I presume you use Sift for the website as well? Or is that a custom/another service?

Yeah website text goes through it as well now.

1 Like


On a serious note, it would be nice if there were some way to use this or emulate a basic chat filter in some way while on a test server.

Also, is there any way to detect whether or not a chat message should be “[Content Deleted]”? I’m trying to emulate the default chat as best as possible.

4 Likes

What if a player leaves, but their message still needs to be filtered for people?
I have a system that filters for the sender and the receiver in parallel, then masks the 2 results. I cache the result for the sender, because I don’t filter the message for the receiver until the message is being viewed and replicates (It’s all need-to-know). The sender may leave before the receiver views the messages.
Does Masking FilterStringAsync(text, playerFrom, playerFrom) with FilterStringAsync(text, playerTo,playerTo) have the same result as FilterStringAsync(text, playerFrom, playerTo)?

Not a huge concern, I can always change how my system works.

I think the [Content Deleted] in game chat is a relic of the old filtering system. Some words weren’t blocked by the web filter but were blocked by the outdated in-game GUI text filter (such as the word “suck”), and in those cases, the chat GUI replaced the unwritable message with [Content Deleted]. However, I tested in Studio and it looks like they’ve taken out that GUI text filter to solely use this system.

Anyway, I’ve been using this function in my game for a day and it’s working so much better than the previous FilterStringForPlayerAsync function. :slight_smile: No chat lag, no errors, none of that hassle. And Community Sift definitely seems like it’ll boost the quality of communication on ROBLOX. Thanks for these improvements!

3 Likes

If I remember correctly there was no reason why everything shouldn’t work on a test server, so I’ll see what can be done about that.

From the client code side the chat filtering API is basically a black box, so can’t do too much. I think content deleted happens when a message passes a certain “badness threshold”, though don’t quote me on that.

Finally, there was a VERY old (think pre-2010) client code chat system that was removed a few weeks ago. The only filtering that should happen should be from this communitysift filter now.

1 Like

So you would you possibly want a “FilterStringForPlayerIdsAsync”, where you just pass the player ids? Seems like that may solve your problem.

1 Like

That would be perfect, although there are potential privacy problems, similar to using TeleportService:GetPlayerPlaceInstanceAsync(userId) to follow players from any game.

I remember looking into why TextLabels had a maximum length of 1024 characters during my internship, and it was because the client’s content filter had a maximum length and was truncating the text.

@spotco: Does this still happen with the new chat filtering? I wanted to make a psuedo script editor of sorts, but the 1024 character limit on textboxes put a hold on that. I could have done something funky like create a new textbox each time it reaches 1024 characters, but at that point it really wasn’t worth it anymore.

It still happens

2 Likes

It seems necessary to keep the request max size a finite large number. Try breaking up your message into 1024 chunks to filter.

1 Like

I wouldn’t need to filter the textbox in that case though. I would need to filter any requests to change the text of other textlabels/etc, but the editor wouldn’t need to be filtered itself.

Thanks @spotco for this big upgrade to custom chat! So much better for devs and the community.

We’re not 100% on the CommunitySift system yet. In game and on the website, you’ll only be seeing new results for users under age 13 right now. Filtering for users age 13 and older is coming within the next month.

1 Like