Mercurial > prosody-modules
comparison mod_cloud_notify/mod_cloud_notify.lua @ 4712:48d7a5c16f2b
mod_cloud_notify: Fix some minor luacheck offences
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 18 Oct 2021 11:43:48 +0100 |
parents | 4157773ed4d3 |
children | ae3a129cc296 |
comparison
equal
deleted
inserted
replaced
4711:46ca47a12770 | 4712:48d7a5c16f2b |
---|---|
402 module:log("debug", "Invoking cloud handle_notify_request() for offline stanza"); | 402 module:log("debug", "Invoking cloud handle_notify_request() for offline stanza"); |
403 handle_notify_request(event.stanza, node, user_push_services, true); | 403 handle_notify_request(event.stanza, node, user_push_services, true); |
404 end, 1); | 404 end, 1); |
405 | 405 |
406 -- publish on bare groupchat | 406 -- publish on bare groupchat |
407 -- this picks up MUC messages when there are no devices connected | 407 -- this picks up MUC messages when there are no devices connected |
408 module:hook("message/bare/groupchat", function(event) | 408 module:hook("message/bare/groupchat", function(event) |
409 module:log("debug", "Invoking cloud handle_notify_request() for bare groupchat stanza"); | 409 module:log("debug", "Invoking cloud handle_notify_request() for bare groupchat stanza"); |
410 local node, user_push_services = get_push_settings(event.stanza, event.origin); | 410 local node, user_push_services = get_push_settings(event.stanza, event.origin); |
411 handle_notify_request(event.stanza, node, user_push_services, true); | 411 handle_notify_request(event.stanza, node, user_push_services, true); |
412 end, 1); | 412 end, 1); |
503 local queue = event.queue; | 503 local queue = event.queue; |
504 local stanza = event.stanza; | 504 local stanza = event.stanza; |
505 if not session.push_identifier then return; end | 505 if not session.push_identifier then return; end |
506 if stanza then process_stanza(session, stanza); return; end -- don't iterate through smacks queue if we know which stanza triggered this | 506 if stanza then process_stanza(session, stanza); return; end -- don't iterate through smacks queue if we know which stanza triggered this |
507 for i=1, #queue do | 507 for i=1, #queue do |
508 local stanza = queue[i]; | 508 local queued_stanza = queue[i]; |
509 -- process unacked stanzas (handle_notify_request() will only send push requests for new stanzas) | 509 -- process unacked stanzas (handle_notify_request() will only send push requests for new stanzas) |
510 process_stanza(session, stanza); | 510 process_stanza(session, queued_stanza); |
511 end | 511 end |
512 end | 512 end |
513 | 513 |
514 -- archive message added | 514 -- archive message added |
515 local function archive_message_added(event) | 515 local function archive_message_added(event) |