Check for nil

main
Bram van den Heuvel 2024-02-20 12:00:04 +01:00
parent 35f9494f3f
commit 8b0965b6e4
1 changed files with 3 additions and 0 deletions

View File

@ -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>" .. strong_text .. "</strong> " .. small_text,