Software /
code /
prosody-modules
Changeset
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 |
parents | 4372:78de3c7acf58 |
children | 4374:e707810a943e |
files | mod_cloud_notify_encrypted/mod_cloud_notify_encrypted.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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