From the docs, TextChatMessage is an “immutable data object representing a text chat message”. Despite intending to be immutable, you’re able to write to the TextChatMessage’s properties without issue.
Example:
local textChatService = game:GetService('TextChatService')
function textChatService.OnIncomingMessage(textChatMessage)
textChatMessage.Text = 'im not supposed to be able to write to this but i can'
end
results in:
Expected behavior
Either the TextChatMessage’s properties should be made read-only, or the docs should be updated to remove the word “immutable” from its description
This seems like a potential vulnerability if moderation done on text messages afterOnIncomingMessages is allowed to modify it’s contents and while it can still be attributed to the player sending the message.
And other people can do the complete opposite by making people say some things that can get people terminated. It’s best to just leave it up to the Roblox filter than to risk another DWC situation.
It can’t get them terminated because the message gets sent to Roblox servers separately. By filtering I meant completely stopping the message from being sent, which happens when you set it to " ".
I highly doubt this. It’s very unlikely Roblox would’ve made such a huge security issue, and not only this, but it would’ve been abused by now if this was the case. I might do some testing to check this out.
TextChatMessageProperties also allows developers to change displayed message contents (and that is intended). Also, the callback mentioned; OnIncomingMessage; is implemented only on the client and I could only hope that filtering is handled on the server.