diff options
author | Badlop <badlop@process-one.net> | 2011-05-26 12:50:40 +0200 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2011-05-26 12:50:40 +0200 |
commit | 1c0b99e16209988dc1e53980b87dbba5d43e3029 (patch) | |
tree | 8edd4cacd190201df580021c49010abcf502b51a /src | |
parent | Several fixes and improvements in ejabberd.init.template (diff) |
A user can query his own Last activity, even if not subscribed to oneself
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_last.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mod_last.erl b/src/mod_last.erl index 7af40c31..2d930bef 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{}, |