Changeset

3408:e03fd9a16e19

mod_message: Discard headline messages sent to offline full JIDs (to follow latest spec updates).
author Waqas Hussain <waqas20@gmail.com>
date Mon, 26 Jul 2010 02:18:03 +0500
parents 3407:15f633285755
children 3409:b2a112720cae
files plugins/mod_message.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_message.lua	Mon Jul 26 01:52:04 2010 +0500
+++ b/plugins/mod_message.lua	Mon Jul 26 02:18:03 2010 +0500
@@ -26,7 +26,7 @@
 	elseif t == "groupchat" then
 		origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));
 	elseif t == "headline" then
-		if user then
+		if user and stanza.attr.to == bare then
 			for _, session in pairs(user.sessions) do
 				if session.presence and session.priority >= 0 then
 					session.send(stanza);