Opened 9 years ago
Closed 9 years ago
#6842 closed defect (bug) (fixed)
Private Group @mention notifications should not go to non group members
Reported by: | timeuser | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 2.5 | Priority: | normal |
Severity: | normal | Version: | 2.4.0 |
Component: | Activity | Keywords: | needs-patch needs-unit-tests |
Cc: |
Description
Posts in groups cause notification emails to be sent to all users @mentioned in the post. Notification emails should not be sent to @mentioned users that are not a member of the group if the group is private or hidden.
Change History (7)
#2
@
9 years ago
- Component changed from API to Component - Activity
- Milestone changed from Awaiting Review to 2.5
Good catch! Something along the lines of your fix will work - I'll rewrite it to keep some separation between our components.
#4
@
9 years ago
- Owner set to boonebgorges
- Resolution set to fixed
- Status changed from new to closed
In 10469:
#5
@
9 years ago
What if a user is an admin? It would be nice if they still received the notification in that case even if they are not a member. Technically they can view the posts anyway and our users are in the habit of @mentioning admin users for help.
How do I submit a patch for this? I think it can be fixed by checking if user is a member of the group in bp_activity_filters.php function bp_activity_at_name_send_emails()
Insert at line #341 in bp_activity_filters.php
if (bp_is_group()) { $current_group = groups_get_current_group(); // if the group is not public and mentioned user is not a member then don't send a notification if ('public' != $current_group->status && !groups_is_user_member( $user_id, $current_group->id )) { continue; } }