25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

A user can query his own Last activity, even if not subscribed to oneself

This commit is contained in:
Badlop 2011-05-26 12:50:40 +02:00
parent f850bcbbc9
commit 1c0b99e162

View File

@ -116,7 +116,9 @@ process_sm_iq(From, To, #iq{type = Type, sub_el = SubEl} = IQ) ->
roster_get_jid_info, Server, roster_get_jid_info, Server,
{none, []}, [User, Server, From]), {none, []}, [User, Server, From]),
if 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( UserListRecord = ejabberd_hooks:run_fold(
privacy_get_user_list, Server, privacy_get_user_list, Server,
#userlist{}, #userlist{},