[buddypress-trac] [BuddyPress Trac] #6375: Need to fix parameter in do_action statement for sending email notifications to commenters you have received comments
buddypress-trac
noreply at wordpress.org
Thu Apr 16 14:40:56 UTC 2015
#6375: Need to fix parameter in do_action statement for sending email
notifications to commenters you have received comments
----------------------------------+-----------------------------
Reporter: dtc7240 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Component - Activity | Version:
Severity: normal | Keywords: has-patch
----------------------------------+-----------------------------
Hi guys. In #6057, there was some discussion concerning adding reply
notifications to the new wp_bp_notifications table. I have some thoughts
on that, but I'll weigh in on that discussion there after I finish this
ticket.
As I'm actually running my BuddyPress site in an app environment via
PhoneGap, my site features actual push notifications. The trigger I'm
using to generate a push notification is the bp_notification_before_save
hook. In order to generate a push notification when someone has replied
to something you generated in the activity stream, I am for now using both
the bp_activity_sent_reply_to_update_email and
bp_activity_sent_reply_to_reply_email hooks to populate the notifications
table myself.
While I was going through the code, I ran across a problem with the
parameters of the bp_activity_sent_reply_to_reply_email hook that appears
to just be a copy/paste oversight. I would guess that the entire if
statement in which this hook is contained was originally copied from the
if statement containing the bp_activity_sent_reply_to_update_email hook
and then modified.
The user_id passed as a parameter in the
bp_activity_sent_reply_to_reply_email do_action hook is that of the author
of the activity that started the thread (as it should be in the other
hook), but in this case should be the user_id of the author of the comment
to which a reply is being made.
'''Can we please change "$original_activity->user_id" to
"$parent_comment->user_id" in the "bp_activity_sent_reply_to_reply_email"
hook?'''
Or if you're worried someone is currently using that hook with the
incorrect data, create a new hook with the alteration?
Many thanks,
Scott
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6375>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list