Flagging a channel user

Flag and Unflag a channel user

While having moderators surveying your chats is great, this doesn't scale well. A way to overcome this is to let your users do the work for your moderators: by letting users report other users or specific messages, the work of moderators goes from scanning each message in each channel to investigate each user report (to both users and messages) and react only when deemed necessary.

Flag and Unflag Users

In order to report a user, create an instance of EkoUserFlagger by calling EkoUser.report(); Beware that each EkoUserFlagger is tied to only one specific user.

EkoUser user;
EkoUserFlagger flagger = user.report();

Flag a user

To flag a user, call the following method:

// flag a user
flgger.flag()
      .doOnComplete(() -> {
        // User is already flagged. you may update the UI accordingly here
      })
      .subscribe();

Unflag a user

To unflag a user, call the following method:

// un-flag a user
flagger.unflag()
       .subscribe();

Check whether we have already flagged this user

// check whether we already have flagged this user 
boolean isFlaggedByMe = user.isFlaggedByMe();

// get the number of people who already have flagged this user
int totalFlagCount = user.getFlagCount();

Last updated