Sending nothing in senpai makes the if check to work properly, however
if sent nothing but a space, senpai will panic, as parseCommand assumes
it is alphanumerical and not just a space.
This commit fixes it by not allowing a message to only contain just
spaces.
Signed-off-by: sewn <sewn@disroot.org>
---
commands.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/commands.go b/commands.go
index cc7282f..fba84d8 100644
--- a/commands.go+++ b/commands.go
@@ -934,7 +934,7 @@ func (app *App) handleInput(buffer, content string) error {
confirmed := content == app.lastConfirm
app.lastConfirm = content
- if content == "" {+ if strings.TrimSpace(content) == "" { return nil
}
base-commit: 5e771831a3196f49d4417e0f913da64a251e8cb5
--
2.43.0
Hi,
Thanks for your patch.
Modified the way to address the issue (fix parseCommand rather than an
early return). And pushed :-)
To git.sr.ht:~delthas/senpai
edb498b..1ad07b5 master -> master