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.
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),