make !pm relay recognize the reset option

This commit is contained in:
Aine 2025-12-21 16:12:39 +00:00
parent 255d8a446a
commit 4f33e7eb8d
No known key found for this signature in database
GPG key ID: 34969C908CCA2804

View file

@ -207,6 +207,10 @@ func (b *Bot) setRelay(ctx context.Context) {
}
value := b.parseCommand(evt.Content.AsMessage().Body, false)[1] // get original value, without forced lower case
if value == "reset" {
value = ""
}
cfg.Set(config.RoomRelay, value)
err = b.cfg.SetRoom(ctx, evt.RoomID, cfg)
if err != nil {