From e710ac51eb68dad95544a15c6c9c66344bda6892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6hler?= Date: Fri, 5 Nov 2010 11:42:32 +0100 Subject: [PATCH] Correct privacy check direction in mod_last (EJAB-1339) The change for EJAB-1271 to change the direction of the privacy check from out to in violates the idea that the check should imitate a subscription state check of from. Rather correct the order of the From and To parameters. --- src/mod_last.erl | 4 ++-- src/mod_last_odbc.erl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mod_last.erl b/src/mod_last.erl index 28832ca8d..270c54f70 100644 --- a/src/mod_last.erl +++ b/src/mod_last.erl @@ -152,9 +152,9 @@ process_sm_iq(From, To, #iq{type = get} = IQ_Rec) -> privacy_check_packet, exmpp_jid:prep_domain(To), allow, [exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To), UserListRecord, - {From, To, + {To, From, exmpp_presence:available()}, - in]) of + out]) of allow -> get_last(IQ_Rec, exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To)); deny -> diff --git a/src/mod_last_odbc.erl b/src/mod_last_odbc.erl index d05580de3..5bb98aa04 100644 --- a/src/mod_last_odbc.erl +++ b/src/mod_last_odbc.erl @@ -111,9 +111,9 @@ process_sm_iq(From, To, #iq{type = get} = IQ_Rec) -> privacy_check_packet, exmpp_jid:prep_domain(To), allow, [exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To), UserListRecord, - {From, To, + {To, From, exmpp_presence:available()}, - in]) of + out]) of allow -> get_last(IQ_Rec, User, Server); deny ->