Opened 8 years ago
Closed 8 years ago
#7135 closed defect (bug) (fixed)
Activity reply notifications should use the comment ID instead of the parent activity ID
Reported by: | r-a-y | Owned by: | r-a-y |
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Activity | Keywords: | has-patch |
Cc: |
Description (last modified by )
In #6057, we introduced activity reply screen notifications.
Currently, activity reply notifications use the parent activity ID to record the notification.
We should use the activity comment ID instead.
This is important when blog comment <-> activity comment synchronization is on as it is not possible to mark the notification as read on a blog post.
The attached patch does four things:
- Switches activity reply notifications to use the activity comment ID instead of the parent activity ID.
- Marks individual activity reply notification as read. See the new
bp_activity_remove_screen_notifications_for_non_mentions()
function. This handles both single activity permalinks and blog posts. - Alters
bp_activity_get_permalink()
to add the#acomment-X
anchor directly. This is so notification links go directly to the comment in question. - Reverts
bp_activity_remove_screen_notifications_single_activity_permalink()
to before #6057 was introduced.
Ping @imath.
Attachments (5)
Change History (16)
This ticket was mentioned in Slack in #buddypress by djpaul. View the logs.
8 years ago
This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.
8 years ago
#6
@
8 years ago
@r-a-y Which approach do you prefer? Are you hoping to land this today for 2.6 or is this a 2.6.1 fix?
#7
@
8 years ago
I probably prefer the second patch. Would prefer to land this today as activity reply notifications is a new feature we are introducing and it should be bug-free.
Here's how to duplicate the blog post notification issue:
- Under "Settings > BuddyPress > Options", make sure "Allow activity stream commenting on blog and forum posts" is checked.
- Under "Settings > BuddyPress > Components", turn on "Site Tracking"
- Create a blog post and enable commenting for that post.
- Login as another user and go to the activity directory and find the activity item for the blog post.
- Create an activity reply. This should create a notification for the blog post author.
- Login as the blog post author and go to your notifications.
- Click on the activity reply notification. The notification will not be marked as read.
#8
@
8 years ago
Thanks for testing, @dcavins.
Regarding your comment on Slack:
Related: if a member replies to a comment, should the comment author be notified?
If a member posts a comment from the blog post page, a screen notification will not be added.
03.patch
solves this. Screen notifications are now added if a comment is added from the blog post page and not just from the activity directory page. See bp_activity_add_notification_for_synced_blog_comment()
and the new 'bp_blogs_comment_sync_activity_comment'
hook.
This piggybacks off of the activity reply notification format so "activity stream commenting on blog and forum posts" needs to be enabled.
02.patch
uses a slightly different approach.For point 2, to mark the individual activity reply notification as read, we use the notification ID (
'nid'
) for the query argument instead of the activity comment ID (aid
) and notification action (n
) from01.patch
.