# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1459516285 -7200
# Node ID f965f86a5cad6ec5f338267fb1580fb261200122
# Parent  ead81e222fde9f99093e53c8349afe1194159137
mod_presence_cache: Check stanzas only from s2sin (not needed, even with mod_bidi)

diff -r ead81e222fde -r f965f86a5cad mod_presence_cache/mod_presence_cache.lua
--- a/mod_presence_cache/mod_presence_cache.lua	Thu Mar 31 14:48:30 2016 +0200
+++ b/mod_presence_cache/mod_presence_cache.lua	Fri Apr 01 15:11:25 2016 +0200
@@ -12,7 +12,7 @@
 	local origin, stanza = event.origin, event.stanza;
 	local typ = stanza.attr.type;
 	module:log("debug", "Cache hook, got %s from a %s", stanza:top_tag(), origin.type);
-	if origin.type:match"^s2s" and ( typ == nil or typ == "unavailable" ) then
+	if origin.type == "s2sin" and ( typ == nil or typ == "unavailable" ) then
 		local from_jid = stanza.attr.from;
 		local from_bare = jid_bare(from_jid);
 		local username = jid_split(stanza.attr.to);