Closed ryanlerch closed 1 year ago
I think we can pretty much copy that exact code from Supybot:
send_fedora_messaging
config key (default False)fedora.py
file to source at startup, if config is Truesendfedoramessage
function from Supybotif
s as Supybot, eg this one
if self.config.send_fedora_messaging:
self.sendfedoramessage("meeting.item.accepted", nick=nick, **kwargs)`
We can make fedora_messaging
an option Pip dependency, and only load it if the config key is set. I think that should work?
I like this approach, because it means we can implement multiple backends for storage, etc. While your deployment of this plugin would want to format and push the logs to https://meetbot.fedoraproject.org/, I would like to start pushing things like this to the Ansible forum. So we need configurable backends anyway.
Took a shot at this today, I think I have the bare-bones of something working. @ryanlerch take a look at this diff in the backends
branch.
It definres a fedora.py
and ansible.py
and allows you to pick which in the plugin config file. You can see both define log_msg
which is then called from the main bot in (start|end)meeting
.
My Python is ... not the best, so this might be a terrible way of going about this, but it seems to work. Here's a log snippet from my dev setup:
[2023-08-14 10:50:14,505] [INFO@maubot.instance.meetbot] Ansible: Starting
<snip matrix logs>
[2023-08-14 10:50:32,130] [INFO@maubot.instance.meetbot] Ansible: Ending
So long as the backend plugins all define the same messages, and we take care to factor common stuff up to the main plugin, I think this will do for now?
going to close this one -- can do fedora messages with the backends system (its not done yet, but its possible)
Not sure how feasible this is to implement a plugin to a plugin, but the current fedora IRC meetbot sends a message to the Fedora Messaging bus for certain actions. (meeting start, end, actionitems, etc)
This was implemented in meetbot directly in our forked version (since meetbot was basically not under maintenance )
https://github.com/fedora-infra/supybot-meetbot/blob/develop/supybot_meetbot/meeting.py
However, it would be nice to be able to send these messages from the maubot-meetings plugin somehow if we can.