Comparison

mod_cloud_notify/mod_cloud_notify.lua @ 4328:5a30daf2ac02

mod_cloud_notify: Include 'important' flag in push event data
author Matthew Wild <mwild1@gmail.com>
date Wed, 13 Jan 2021 14:09:18 +0000
parent 4325:9b95241c6ae5
child 4332:7a5ca4b285cb
comparison
equal deleted inserted replaced
4327:beb3342f1137 4328:5a30daf2ac02
357 notification_stanza = push_publish; 357 notification_stanza = push_publish;
358 original_stanza = stanza; 358 original_stanza = stanza;
359 node = node; 359 node = node;
360 push_info = push_info; 360 push_info = push_info;
361 push_summary = form_data; 361 push_summary = form_data;
362 important = not not form_data["last-message-body"];
362 }; 363 };
363 364
364 if module:fire_event("cloud_notify/push", push_event) then 365 if module:fire_event("cloud_notify/push", push_event) then
365 module:log("debug", "Push was blocked by event handler: %s", push_event.reason or "Unknown reason"); 366 module:log("debug", "Push was blocked by event handler: %s", push_event.reason or "Unknown reason");
366 else 367 else