Diff

mod_push2/mod_push2.lua @ 6344:eb834f754f57 draft default tip

Merge update
author Trần H. Trung <xmpp:trần.h.trung@trung.fun>
date Fri, 18 Jul 2025 20:45:38 +0700
parent 6312:2488254c1bc2
line wrap: on
line diff
--- a/mod_push2/mod_push2.lua	Sun Jun 15 01:08:46 2025 +0700
+++ b/mod_push2/mod_push2.lua	Fri Jul 18 20:45:38 2025 +0700
@@ -152,6 +152,10 @@
 		if stanza:get_child("propose", "urn:xmpp:jingle-message:0") then
 			return true, "jingle call"
 		end
+
+		if stanza:get_child("retract", "urn:xmpp:jingle-message:0") then
+			return true, "jingle call retract"
+		end
 	end
 end
 
@@ -381,7 +385,7 @@
 				to_host = to_host or module.host
 
 				-- If another session has recent activity within configured grace period, don't send push
-				if does_match and match.grace and to_host == module.host and host_sessions[to_user] then
+				if does_match and match.grace and not is_voip(stanza) and to_host == module.host and host_sessions[to_user] then
 					local now = os_time()
 					for _, session in pairs(host_sessions[to_user].sessions) do
 						if session.last_activity and session.push_registration_id ~= push_registration_id and (now - session.last_activity) < match.grace then