mod_cloud_notify_encrypted/mod_cloud_notify_encrypted.lua
changeset 4377 41ac0941b217
parent 4337 97f369745ec7
child 4460 8ed1989e99f9
equal deleted inserted replaced
4376:78de3c7acf58 4377:41ac0941b217
    55 
    55 
    56 	local push_summary = event.push_summary;
    56 	local push_summary = event.push_summary;
    57 
    57 
    58 	local original_stanza = event.original_stanza;
    58 	local original_stanza = event.original_stanza;
    59 	local body = original_stanza:get_child_text("body");
    59 	local body = original_stanza:get_child_text("body");
    60 	if #body > 255 then
    60 	if body and #body > 255 then
    61 		body = body:sub(1, 255);
    61 		body = body:sub(1, 255);
    62 	end
    62 	end
    63 
    63 
    64 	local push_payload = {
    64 	local push_payload = {
    65 		unread = tonumber(push_summary["message-count"]) or 1;
    65 		unread = tonumber(push_summary["message-count"]) or 1;