mod_push2/mod_push2.lua
changeset 5849 83ee752f148c
parent 5668 4b052598e435
equal deleted inserted replaced
5848:37e38ee534ea 5849: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);