From 1c0b99e16209988dc1e53980b87dbba5d43e3029 Mon Sep 17 00:00:00 2001 From: Badlop Date: Thu, 26 May 2011 12:50:40 +0200 Subject: [PATCH] A user can query his own Last activity, even if not subscribed to oneself --- src/mod_last.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mod_last.erl b/src/mod_last.erl index 7af40c31f..2d930bef3 100644 --- a/src/mod_last.erl +++ b/src/mod_last.erl @@ -116,7 +116,9 @@ process_sm_iq(From, To, #iq{type = Type, sub_el = SubEl} = IQ) -> roster_get_jid_info, Server, {none, []}, [User, Server, From]), if - (Subscription == both) or (Subscription == from) -> + (Subscription == both) or (Subscription == from) + or ((From#jid.luser == To#jid.luser) + and (From#jid.lserver == To#jid.lserver)) -> UserListRecord = ejabberd_hooks:run_fold( privacy_get_user_list, Server, #userlist{},