plugins/mod_presence.lua

changeset 1162
bd1f0e6d50a7
parent 1150
d71a8f28f18b
child 1209
86b01a837126
--- a/plugins/mod_presence.lua	Fri May 15 17:28:39 2009 +0200
+++ b/plugins/mod_presence.lua	Fri May 15 17:33:04 2009 +0200
@@ -252,7 +252,7 @@
 	if origin.type == "c2s" then
 		if to ~= nil and not(origin.roster[to_bare] and (origin.roster[to_bare].subscription == "both" or origin.roster[to_bare].subscription == "from")) then -- directed presence
 			origin.directed = origin.directed or {};
-			origin.directed[to] = true;
+			origin.directed[to] = true; -- FIXME does it make more sense to add to_bare rather than to?
 		end
 		if stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then
 			handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza);
@@ -268,6 +268,7 @@
 			core_route_stanza(origin, stanza);
 		end
 	end
+	return true;
 end
 
 local add_handler = require "core.eventmanager2".add_handler;

mercurial