Skip to content

Takes wall_access into consideration when displaying activities

Right now, wall_access is never taken in consideration when displaying/filtering activity notifications.

I've changed only the hidden_for? of the presenter. The display_to? methods remains unmodified since I believe the wall_access attribute should not affect how contents are displayed, just walls.

Considering that every notification has a source profile (owner) and a target profile (target), the notification will be displayed depending on the visibility of the wall of a profile, depending on the target type:

  • Organization: the organization itself;
  • Article: the profile it was published in;
  • Scrap: the receiver;
  • None of the cases above: it fails back to the owner.

All scenarios above are valid for public target profiles. Notifications with private target profiles are never displayed. Furthermore, only the wall and profile visibilities of the target are taken in consideration when displaying activity notifications.

The following changes were also implemented:

  • Activity notifications are not displayed if the allow_followers attribute of the target is false. The notifications are still created, though;
  • Community members will only be notified if they follow the community. The same already happens with friends: if A is a friend of B and A unfollowed B, notifications of B activities will not be created for A;
  • It is not possible to unfollow friends and communities from which the user is a member.

Merge request reports