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{},