A maubot plugin that automatically invites event participants from pretix into a matrix room. This helps facilitate Fedora virtual events that are run on Matrix.
This project began with the use of pretix + Matrix combo from the F40 release party (ticket) and started a community operations intern initiative to adapt and automate the process for the Fedora Week of Diversity 2024 (ticket)
Once the bot is running and in a matrix room, you can interact with it using a few commands:
!authorize
(no arguments) will give you an oauth url to give the bot read only access to a pretix team you are a member of.
!authorize <callback url>
will complete the auth process in the event you dont have (or havent configured, or this bot doesnt yet support) a web server thats publicly-accessible and HTTPS-capable for receiving the callback URL to complete the authentication process. Simply use this command with the URL that you are redirected to after auth and it will do the rest.
!batchinvite <pretix url>
this command, in combination with the pretix invitation url you probably distributed to your event participants (i.e. https://pretix.eu/fedora/matrix-test/
) will allow the bot to query your event and grab participants matrix IDs and attempt to invite them to the room where the command was issued
!status
check the bot's auth status and the status of the current room (is it mapped to an event)
!setroom <pretix url>
this command, in combination with the pretix invitation url you probably distributed to your event participants (i.e. https://pretix.eu/fedora/matrix-test/
) will associate this room with the event so the bot doesnt need the room ID to be specified when inviting people (such as through !batchinvite
(TODO), or the webhook handler)
!unsetroom
this command will remove this room from all events it is currently associated with
Other commands (or more up to date usage information for the above commands) is also available through the !help
command.
Authorization and batch invite
Association and status
webhook auto-invites
External things the bot needs to run well:
If you would simply like to get this bot running and start using it, follow these steps.
docker build -t maubot-custom .
config.yaml
as you'll need these laterconfig.yaml
maubot
and the other dependencies from requirements.txt installed), open this repository run mbc build
to build the plugin and save it to a .mbp
compressed file in the current directoryhttps://localhost:8000/
- in the future this may support reusing the same public facing web domain thats used by the incoming webhook endpointIf you want to use the webhooks feature of the bot
Webhook URL is:
. The webhook url that follows is the domain you may have configured in step 4 with /_matrix/maubot/plugin/<instance id>/notify
as the url. Now would be a good time to set up your proxy, or whatever else is needed to ensure that this URL is publicly accessible.See CONTRIBUTING.md for more details on the development workflow
This project may handle, and possibly store, information that could be considered "personal information" under various privacy rules such as the GDPR. While this bot tries to use as little information as possible in order to operate it is ultimately the responsibility of the event hosts and operators of this bot to ensure that its use of information is compliant with the laws in your area.
Once you are in a pretix team you can set up an event. The process is pretty much the same as setting up any event in pretix, however....
If this event is being set up for testing, be sure to uncheck the "list publicly" box on the main settings page so that the event doesnt show up in your orgs public list of events
You will also need to configure a custom question to collect participant's Matrix ID. Pretix doesnt seem to have user facing documentation on this, so your best bet is probably to copy the settings from an existing event that had these questions already set up.
Here's what you would need to set the values to for the matrix id question (ignore the FAS one):
Currently this bot is hardcoded to look for an internal identifier
value of matrix
. This can be found under the advanced menu when editing the question. In the future this may be configurable.
While you are in the advanced menu, you may also want to add helptext to this question to inform event registrants that you will use this matrix ID to invite them to the event and that it must be specified in the full @username:domain.tld
matrix username format.
Webhooks are an organization-level setting that requires admin permissions to edit. Pretix has documentation for how to configure a webhook.