Draupnir Demo Notes

These notes introduce Draupnir's functionality. Where relevant, it is restricted to the context of PubHubs.

See also the accompanying Draupnir Demo script.

This is not complete, and not intended as a complete description of Draupnir. See Draupnir's docs for that.

Key Benefits

  • Shared deny-lists. Example: each hub has its own Hub Code-of-Conduct list, and also the central platform publishes a central Spammers list and a central list of accounts that violated the rules of several hubs.
  • Moderation actions are attributed to a role account, named something like "Moderation", instead of exposing the personal name of a moderator. (It might be appropriate to reveal real names in some contexts and not in others.)

Bot mode and Synapse module

Draupnir operates in two ways: as a bot account, and as a Synapse module. The Draupnir bot watches our matrix rooms, and performs actions when certain users join a room or when particular messages are sent. The Draupnir Synapse module watches the matrix server as a whole, preventing unwanted users from joining rooms or inviting others. (It can also prevent external servers from federating, but that's not currently relevant to PubHubs.)

Understanding PL, roles, join state, ACLs

Matrix has, per room:

  • power levels (PL), generally in the range 0-100, defined for the possible actions (post, invite, call, redact, etc.) and defined for each user (determining which actions they can do).
  • join state for each known user: invited, joined, leave, ban.
  • Access Control List (ACL) – patterns governing which external servers are allowed.

(ACLs are out of scope, as the current generation of PubHubs doesn't federate a hub with other servers.)

These are all recorded in the room state events.

Power levels and actions/roles

  • possible actions (roles) are: post, invite, call, redact, change room name, etc.
  • each possible action (role) requires a particular power level (~0-100).
  • each user in the room has a power level determines which actions (roles) they are allowed.

The user that creates a room gets power level 100 ('admin') and all permissions. We need to give a moderation bot the same 'admin' power level. Other users, we can choose: typically they get PL 0 (just a few permissions) until someone promotes them to a higher PL.

Join State

Each known user is in one of these states:

  • invite
  • join
  • leave
  • ban

Removing a user temporarily (they can re-join) is known as "kicking" or "removing".

Removing a user permanently (they cannot re-join) is known as "banning".

Configuring Draupnir

Some key config settings:

  • management room (the admins/moderators go here to control the bot)
  • abuse reporting
  • automatically redact (for list of moderation reasons, such as "spam"...)
  • protected rooms or "protectAllJoinedRooms"
  • newcomer watch word list

Draupnir works as a bot – a kind of user account. As such, the Draupnir bot needs to be a member of each room and have sufficient power level in each room, in order to watch and take actions in those rooms.

Inviting Draupnir to rooms

  • manually: invite & make admin, in each room
  • automatically: …

Deny Lists

Draupnir can use lists of banned users, which can be shared.

You can set up several lists, perhaps one for "Code of Conduct infringements", and another for "Spam". You can have Draupnir "subscribe" to the lists that you created.

You can also have Draupnir subscribe to lists that someone else published, and you can publish your own lists, for others to use.

Using Draupnir

Issuing bans:

  • !kick/ban <user> <room>
  • !kick/ban <user> – from all protected rooms

...


See: