From 2c47bc7e1424f45778c6e1b608f98e24934ab098 Mon Sep 17 00:00:00 2001 From: Aine Date: Fri, 28 Oct 2022 08:44:09 +0300 Subject: [PATCH] fix lowercase --- bot/access.go | 2 +- bot/command_owner.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bot/access.go b/bot/access.go index 48d43a0..c76a02a 100644 --- a/bot/access.go +++ b/bot/access.go @@ -77,7 +77,7 @@ func (b *Bot) AllowAuth(email, password string) bool { return false } - roomID, ok := b.GetMapping(utils.Mailbox(email)) + roomID, ok := b.getMapping(utils.Mailbox(email)) if !ok { return false } diff --git a/bot/command_owner.go b/bot/command_owner.go index 88ed552..78dd4fb 100644 --- a/bot/command_owner.go +++ b/bot/command_owner.go @@ -97,6 +97,7 @@ func (b *Bot) setOption(ctx context.Context, name, value string) { } if name == roomOptionPassword { + value = b.parseCommand(evt.Content.AsMessage().Body, false)[1] // get original value, without forced lower case value, err = argon2pw.GenerateSaltedHash(value) if err != nil { b.Error(ctx, evt.RoomID, "failed to hash password: %v", err)