Flag/Unflag a Message
Last updated
Last updated
The Chat SDK product also includes a flag method that allows users to flag messages in their app. Once a message is flagged, an indicator will appear in the Admin console, where an administrator can review and validate the flag. If the content is found to be in violation of your app's policies, it can be deleted from the app. On the other hand, if the content is not found to be in violation, the flag can be revoked.
The flag method provides an essential tool for managing user-generated content in your app, ensuring that inappropriate messages can be quickly identified and removed. By integrating this method into your app's user interface, you can empower your users to take an active role in promoting a safe and respectful community.
To use the function you simply need to identify the messageId
that you'd like to flag.
Another useful feature is the unflag method, which enables users to revoke a previously flagged message. If a user flags a message by mistake or if the message is found not to violate your app's policies after review, the unflag method can be used to remove the flag from the message. It ensures that users have control over the content they flag and the ability to reverse their flag if necessary.
Similar to the flag function, you simply need to identify the messageId
that you'd like to unflag.
The isFlaggedByMe
method allows users to check whether they have previously flagged a particular message. This method provides a convenient way for users to keep track of the content they have flagged and to ensure that they are staying up-to-date with their moderation activities.
By using the isFlaggedByMe method, your app's users can quickly determine whether they have already flagged a particular message and avoid duplicating their efforts.