mod_presence: Fixed a traceback on outgoing subscriptions from offline users.

Fri, 11 Jun 2010 20:45:00 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Fri, 11 Jun 2010 20:45:00 +0500
changeset 3235
651139e831b1
parent 3234
2d61773d7ab4
child 3240
9782a222e941

mod_presence: Fixed a traceback on outgoing subscriptions from offline users.

plugins/mod_presence.lua file | annotate | diff | comparison | revisions
--- 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);

mercurial