Skip to content

Define group rules and code of conduct #33

@mayel

Description

@mayel

"As a fediverse user, I want to see a group's rules before joining or posting, so I know what behavior is expected."

Groups often have a code of conduct that users have to agree to before joining or participating. We propose standardising how rules are represented on Group actors for federation.

Existing approaches:

  • Lemmy: Exposes community rules simply as a part of the summary text on the Group
  • Mastodon: Instance-level rules are an array of objects with id and text

Suggested representation:

A rules property, supporting translations via the existing ActivityPub contentMap pattern:

{
  "type": "Group",
  "id": "https://example.org/groups/1",
  "rules": [
    {
      "mediaType": "text/html",
      "name": "Be respectful",
      "nameMap": {"fr": "Soyez respectueux"},
      "content": "<em>No personal attacks</em> or harassment.",
      "contentMap": {"fr": "Pas d'attaques personnelles ou de harcèlement."}
    },
    {
      "mediaType": "text/plain",
      "name": "Stay on topic",
      "nameMap": {"fr": "Restez dans le sujet"},
      "content": "Keep discussions related to the group's topic.",
      "contentMap": {"fr": "Gardez les discussions liées au sujet du groupe."}
    }
  ]
}

Translation pattern:

  • name / content - Default language text (based on the community's primary language)
  • nameMap / contentMap - Language-tagged alternatives (standard ActivityPub pattern, W3C Activity Streams *Map properties)
  • Instances should display the user's preferred language if available, falling back to the default

Backwards compatibility:

  • Implementations not understanding rules or the rule attachments simply ignore them
  • Rules don't affect protocol behavior - they're informational only
  • Existing summary field can include a link to a page that display the rules for simpler implementations

Open questions:

  • Should we use attachment or the like (reusing existing AP vocabulary) vs dedicated rules property (cleaner but new)?
  • Should rules be orderable (numbered)? Could use an OrderedCollection or just rely on array order
  • Should rules have categories or severity levels?
  • Should Flag activities reference which rule was violated?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions