Changeset

3235:651139e831b1

mod_presence: Fixed a traceback on outgoing subscriptions from offline users.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 11 Jun 2010 20:45:00 +0500
parents 3234:2d61773d7ab4
children 3240:9782a222e941
files plugins/mod_presence.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_presence.lua	Fri Jun 11 14:25:54 2010 +0100
+++ b/plugins/mod_presence.lua	Fri Jun 11 20:45:00 2010 +0500
@@ -169,7 +169,7 @@
 
 function handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare)
 	local node, host = jid_split(from_bare);
-	if to_bare == origin.username.."@"..origin.host then return; end -- No self contacts
+	if to_bare == from_bare then return; end -- No self contacts
 	local st_from, st_to = stanza.attr.from, stanza.attr.to;
 	stanza.attr.from, stanza.attr.to = from_bare, to_bare;
 	log("debug", "outbound presence "..stanza.attr.type.." from "..from_bare.." for "..to_bare);