From e9d60b0013307cfa0fdff2f3792423e284019fec Mon Sep 17 00:00:00 2001 From: y5nw <37980625+y5nw@users.noreply.github.com> Date: Fri, 22 Mar 2024 20:34:32 +0100 Subject: [PATCH] Disallow sending to empty recipient --- api.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api.lua b/api.lua index ff4625b..541063f 100644 --- a/api.lua +++ b/api.lua @@ -51,6 +51,8 @@ function mail.send(m) table.insert(undeliverable_reason, reason) end return false, table.concat(undeliverable_reason, "\n") + elseif not next(recipients) then + return false, S("You did not specify any valid recipient.") end local extra = {}