Software /
code /
prosody-modules
Diff
mod_cloud_notify_encrypted/mod_cloud_notify_encrypted.lua @ 4373:41ac0941b217
mod_cloud_notify_encrypted: Fix traceback on push of message with no body
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 22 Jan 2021 22:05:05 +0000 |
parent | 4333:97f369745ec7 |
child | 4456:8ed1989e99f9 |
line wrap: on
line diff
--- a/mod_cloud_notify_encrypted/mod_cloud_notify_encrypted.lua Fri Jan 22 15:19:53 2021 +0100 +++ b/mod_cloud_notify_encrypted/mod_cloud_notify_encrypted.lua Fri Jan 22 22:05:05 2021 +0000 @@ -57,7 +57,7 @@ local original_stanza = event.original_stanza; local body = original_stanza:get_child_text("body"); - if #body > 255 then + if body and #body > 255 then body = body:sub(1, 255); end