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

Flag a user

To flag a user, call the following method:

userRepo.flag({ userId: 'user123' })

Unflag a user

To unflag a user, call the following method:

userRepo.unflag({ userId: 'user123' })

Check whether we have already flagged this user

Both of these methods return a promise meaning they can be chained with .then and .catch handlers:

userRepo.flag({ userId: 'user123' })
    .then(() => {})
    .catch(() => {})

Last updated