mediafinger / yournaling

An app to journal, to link memories, photos, locations and combine them to a travel log
Other
0 stars 0 forks source link

Blocking content and users by Moderators #44

Open mediafinger opened 5 months ago

mediafinger commented 5 months ago

Blocking

Moderators can block content

Blocking could happen for various reasons:

class ContentBlock
  self.table_name :content_blocks

  attributes
    :team_yid
    :post_yid
    :moderator_yid
    :reason (enum)
    :explanation (text)
    :discussion (array) # or link to special DM thread?!
    :created_at
    :updated_at
    :permanent (boolean)
    :resolved (boolean)
end

class [Insight & Post]
  has_many :content_blocks, where.not(resolved: true)
end

class Team
  has_many :content_blocks, where.not(resolved: true)
end

# neither foreign_key nor polymorphic association to Insights & Posts
# if needed the `fynd` method can be used
# usually checking if/how to display content the content_blocks table can be filtered by the content_yid(s)

Moderators can block users

class UserBlock
  self.table_name :user_blocks

  attributes
    :user_yid
    :moderator_yid
    :reason (enum)
    :explanation (text)
    :discussion (array) # or link to special DM thread?!
    :removed_permissions (array)
    :created_at
    :updated_at
    :permanent (boolean)
    :resolved (boolean)
end

class User
  has_many :user_blocks, where.not(resolved: true)
end

Moderators can exclude users from the platform

Comments and Direct Messages

Comments and Direct Messages are a special case. No blocking by moderation is necessary, as Users and Teams can block other Users themselves and "remove" any comment (we will only remove visibility, while keeping the comment stored and still visible to the original writer).

Users should be able to report content, comments, direct messages or users

Users should be a able to create a ViolationReport, explaining why certain content or users are violating the rules of the platform or hurting their feelings.

Comments and Direct Messages should also be reportable. Reporting them will make them invisible to the reporting Team or User (like they "removed" them) and

class ViolationReport
  self.table_name :violation_reports

  attributes
    :reporter_yid
    :team_yid (optional, set when reported over Team Board)
    :violater_yid
    :reason (enum)
    :explanation (text)
    :discussion (array) # or link to special DM thread?!
    :created_at
    :updated_at
    :resolved (boolean)
end

class [User & Team]
  has_many :violating_reports, where.not(resolved: true)
end

# neither foreign_key nor polymorphic association to "Violator" (Insights, Posts, Comments, DMs, Users)
# if needed the `fynd` method can be used

Moderation board

Like Teams will have a "Team board", Moderators should have a "Moderation board" where all ContentBlocks & UserBlocks are listed, where ViolationReports show up and where all DM threads are accessible through those objects.