I am running comet chat on React and added the Profanity extension via the online portal, however, it is not working. I understand it will change the meta data, however, I want it to *** out the words for both users. How would I set this up?
When you send a message that has the word that needs to be masked, both sender and receiver do receive the information in the metadata field of the message.
Instead of displaying the normal messgae you need to display the masked message available in the metadata field.
Hope this helps. If you still face any issues, please do let us know and we will be happy to help you out
Where can I change that option in the source files?
There are two places where this needs to be taken care of:
In the success of the sendMessage() method. The object of the TextMessage class has the mesaage masked with ** in the metadata. You just need to use the same while displaying it in the UI
In the onMessageReceived() callback of the MessageListener class. The object of the TextMessage class obtained has the same masked data in the metadata field which can be displayed in the UI.
Hope this helps
I am unsure of what to change. Could we connect via email or perhaps an online chat service?
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.