Skip to content

Fix group posts triggering post notifs when user is not a a group member minds#4621

Ben requested to merge feat/group-post-notifs-m4621 into master

Ticket(s) / Related Merge Requests

minds#4621 (closed)

Summary of Changes

Fix an issue where when subscribed to a given user's post notifications, when they post in groups that you are NOT a member of, you receive notifications for the posts.

Testing Considerations

Note: No runner is currently deployed for this in the sandbox. You will need access to the k8s cluster to test this locally; if you have it, exec into the engine pod and run the below from the ./engine folder (remember to source secrets). I can do this for you if you want me to set it up at the time of testing.

php cli.php EventStreams --subscription=Core\\Notifications\\PostSubscriptions\\EventStreamsSubscriptions\\PostSubscriptionsEventStreamsSubscription
Scope
  • Caching in this area is aggressive. Joining and rejoining a group may not immediately trigger membership state updates, thus on leaving you may still get notifications for a short period. This is an edge case to be considered out of the scope of test plans.

  • You can consider this as working if on-site notifications are received; this was decided in sprint planning to reduce the weight of the task due to the complexity of setting up sandbox push notifications. Functionally nothing touches the layer that determines which notification to send, so there should be no regression scope in that area.

  • When a subscribed user posts to their channel I receive a notification.

  • When a subscribed user posts to a group that I am NOT a member of, I DO NOT receive a notification.

  • When a subscribed user posts to a group that I am a member of, I receive a notification.

Deployment Considerations

Standard deployment to runners.

Regression Scope

Post notifications runner - adds conditional check in logic.

Platform Affected (web, mobile, etc)

Web.

Developer Testing Completed

Manual, PHPSpec.

Screenshots / Screen Recording

When a subscribed user posts to their channel I receive a notification.

simplescreenrecorder-2024-02-14_17.58.01

When a subscribed user posts to a group that I am NOT a member of, I DO NOT receive a notification.

simplescreenrecorder-2024-02-14_18.01.56

When a subscribed user posts to a group that I am a member of, I receive a notification.

simplescreenrecorder-2024-02-14_18.02.42

Does this impact

  • Localization
  • Dark/light mode
  • Guest mode

Definition of Done Checklist

  • The Acceptance Criteria has been met
  • Code is tested: Testing includes unit/spec, E2E/automated and manual testing
  • Merge requests description has been filled out
Edited by Ben

Merge request reports