From 8b0965b6e41c0337f8f9b0466d50e393e73f3f8c Mon Sep 17 00:00:00 2001 From: Bram van den Heuvel Date: Tue, 20 Feb 2024 12:00:04 +0100 Subject: [PATCH] Check for nil --- lua/send.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/send.lua b/lua/send.lua index e655573..720754c 100644 --- a/lua/send.lua +++ b/lua/send.lua @@ -29,6 +29,9 @@ function matrix.send_message(http_api, body, formatted_body, callback, txnId) end function matrix.send(http_api, strong_text, small_text, callback) + small_text = small_text or "" + strong_text = strong_text or "" + return matrix.send_message( http_api, "**" .. strong_text .. "** " .. small_text, "" .. strong_text .. " " .. small_text,