mod_caps: Only store CAPS if contact is subscribed

If a user is subscribed to a contact but not vice versa, don't store the
contact's CAPS.  This makes sure no PEP items are leaked to the contact.
This commit is contained in:
Holger Weiss 2018-01-29 01:07:38 +01:00
parent d0af61f488
commit f31782a252
1 changed files with 1 additions and 1 deletions

View File

@ -209,7 +209,7 @@ c2s_presence_in(C2SState,
ToSelf = (From#jid.luser == To#jid.luser)
and (From#jid.lserver == To#jid.lserver),
Insert = (Type == available)
and ((Subscription == both) or (Subscription == to) or ToSelf),
and ((Subscription == both) or (Subscription == from) or ToSelf),
Delete = (Type == unavailable) or (Type == error),
if Insert or Delete ->
LFrom = jid:tolower(From),