feat: User flags (#3353)

* feat: Add user flags concept, for tracking bits on a user

* feat: Example flag usage for user invite resend abuse
This commit is contained in:
Tom Moor
2022-04-11 19:42:50 -07:00
committed by GitHub
parent 11c009bdbf
commit 7f5bf6c6b3
5 changed files with 114 additions and 21 deletions

View File

@@ -123,9 +123,12 @@ function UserMenu({ user }: Props) {
await users.resendInvite(user);
showToast(t(`Invite was resent to ${user.name}`), { type: "success" });
} catch (err) {
showToast(t(`An error occurred while sending the invite`), {
type: "error",
});
showToast(
err.message ?? t(`An error occurred while sending the invite`),
{
type: "error",
}
);
}
},
[users, user, t, showToast]