You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To maintain content quality and enforce community standards within the r/boards realm, a reliable flagging system is necessary. This system should allow designated users to flag posts for review and potential deletion. Initially, only permission-ed users (Owner, Admins, Moderators) will be able to flag. The system should support a configurable threshold for automatic deletion when the flag count is met.
Acceptance Criteria:
Implements a Flag struct to store flagging details:
Example
typeFlagstruct {
UserAddress// Address of the user who flaggedReasonstring
}
Extends the Post struct to include a Flags field to track flags:
Context:
To maintain content quality and enforce community standards within the
r/boards
realm, a reliable flagging system is necessary. This system should allow designated users to flag posts for review and potential deletion. Initially, only permission-ed users (Owner, Admins, Moderators) will be able to flag. The system should support a configurable threshold for automatic deletion when the flag count is met.Acceptance Criteria:
Implements a
Flag
struct to store flagging details:Example
Extends the
Post
struct to include aFlags
field to track flags:Example
Includes a public
FlagPost
function that:bp.HasPermission()
Flag
entry to the post'sFlags
fieldImplements a configurable
FlagThreshold
(initially hardcoded to 1 flag) to determine when a post should be hiddenApplies the flagging system to both posts (threads) and comments
Includes error handling for cases where:
Accounts for permission checks using
bp.HasPermission()
instead ofbp.WithPermission()
Includes tests to:
FlagThreshold
Notes
Future updates may include:
FlagThreshold
on a per-board basisThe text was updated successfully, but these errors were encountered: