Software /
code /
prosody-modules
Comparison
mod_push2/mod_push2.lua @ 5869:83ee752f148c
mod_push2: empty table instead of nil when not present
author | Stephen Paul Weber <singpolyma@singpolyma.net> |
---|---|
date | Sun, 25 Feb 2024 19:10:30 -0500 |
parent | 5687:4b052598e435 |
comparison
equal
deleted
inserted
replaced
5868:37e38ee534ea | 5869:83ee752f148c |
---|---|
534 local to = stanza.attr.to | 534 local to = stanza.attr.to |
535 to = to and jid.split(to) or event.origin.username | 535 to = to and jid.split(to) or event.origin.username |
536 | 536 |
537 -- only notify if the stanza destination is the mam user we store it for | 537 -- only notify if the stanza destination is the mam user we store it for |
538 if event.for_user == to then | 538 if event.for_user == to then |
539 local user_push_services = push2_registrations:get(to) | 539 local user_push_services = push2_registrations:get(to) or {} |
540 | 540 |
541 -- Urgent stanzas are time-sensitive (e.g. calls) and should | 541 -- Urgent stanzas are time-sensitive (e.g. calls) and should |
542 -- be pushed immediately to avoid getting stuck in the smacks | 542 -- be pushed immediately to avoid getting stuck in the smacks |
543 -- queue in case of dead connections, for example | 543 -- queue in case of dead connections, for example |
544 local is_voip_stanza, urgent_reason = is_voip(stanza); | 544 local is_voip_stanza, urgent_reason = is_voip(stanza); |