I need to process chat messages on the server-side, and the processed message then needs to be sent to the rest of the clients once it’s ready. Because of this, I need to make sure that the messages are processed only after they are filtered.
I can’t figure out for the life of me how to do this with the new TextChatService, as almost every event and callback only works on the client. I tried using TextChannel.ShouldDeliverCallback just to grab the text and always return true, but the text doesn’t seem to be filtered at that stage. I even tried testing it on a game server outside of studio, and it was still always giving the unfiltered message. The Player.Chatted event won’t work for this either, since that also gives unfiltered messages.
I’ve been trying to avoid putting chat messages through TextService:FilterStringAsync, as that would be filtering the exact same message twice as far as I can tell. Can anybody help me figure out a way to do this with the new service?