fedora-infra / maubot-pretix-invite

A maubot plugin for inviting event participants from the pretix ticketing platform into a matrix room
MIT License
2 stars 0 forks source link

save authorization and assigned event across restarts #5

Open HarHarLinks opened 2 weeks ago

HarHarLinks commented 2 weeks ago

when i update the plugin etc, rooms should stay connected

MoralCode commented 2 weeks ago

yeah this is something I plan to add - probably next week or so. Its also been annoying for me when the bot restarts during testing

MoralCode commented 2 weeks ago

auth is now being persisted. not the event -> room mappings tho

HarHarLinks commented 2 weeks ago

cool! reauthenticating is the most tedious part. now the mappings should not be much harder :)

personally i like to store data that belongs to the room directly in the room state. obviously that isn't an option for secrets such as the auth token.

have you looked into the DB api? https://docs.mau.fi/maubot/dev/database/index.html that might make it fairly easy to scale the required storage flexibly.

MoralCode commented 2 weeks ago

the auth is (essentially) global so that shouldnt be needed per-room. although it may need some changes if this is going to be used in an environment with multiple orgs hosting events with the same bot isntance

Room state defintely sounds like a useful place to store the room->event mapping - I didnt know that was a thing you could do (am relatively new to the inner workings of matrix)