Skip to content

Commit

Permalink
use premod email filter status to show User email marker/tag
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-funk committed Sep 8, 2023
1 parent dda4275 commit 3212ee9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ const markers: Array<
</Localized>
)) ||
null,
(c) =>
(c.status === "PREMOD" && c.author.premoderatedBecauseOfEmailAt && (
<Localized id="moderate-marker-preMod-userEmail" key={keyCounter++}>
<Marker color="pending">User email</Marker>
</Localized>
)) ||
null,
(c) =>
(c.revision &&
c.revision.actionCounts.flag.reasons.COMMENT_DETECTED_LINKS && (
Expand Down Expand Up @@ -229,6 +236,9 @@ const enhanced = withFragmentContainer<MarkersContainerProps>({
tags {
code
}
author {
premoderatedBecauseOfEmailAt
}
revision {
actionCounts {
flag {
Expand Down
7 changes: 7 additions & 0 deletions server/src/core/server/graph/schema/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3158,6 +3158,13 @@ type User {
bio is a user-defined biography.
"""
bio: String

"""
premoderatedBecauseOfEmailAt is set when a user was set to pre-moderated
comments for having an email that was caught by the email pre-moderation
filter.
"""
premoderatedBecauseOfEmailAt: Time @auth(roles: [MODERATOR, ADMIN])
}

"""
Expand Down

0 comments on commit 3212ee9

Please sign in to comment.