Flag / Unflag User feature is an essential tool for maintaining a safe and engaging chat community. With Amity Social Cloud, you can use the flag and unflag user feature to allow moderators and administrators to monitor any inappropriate behavior within a chat channel.
In this section, we will discuss how to use the flag and unflag user feature of Amity Chat SDK to maintain a safe and engaging chat community.
To flag / unflag users on iOS, Android and Flutter SDK, create an instance of UserFlagger
first:
The UserFlagger
lets you flag and unflag a user. It also exposes an asynchronous way to check whether the current logged-in user has already flagged the given user or not.
To flag a user, call the following method:
To unflag a user, call the following method:
To check whether a user has been flagged by the current user: