sbrajesh / bp-activity-comment-notifier Goto Github PK
View Code? Open in Web Editor NEWFacebook like Comment Notifier For BuddyPress activity comments
Home Page: http://buddydev.com/plugins/bp-activity-comment-notifier/
Facebook like Comment Notifier For BuddyPress activity comments
Home Page: http://buddydev.com/plugins/bp-activity-comment-notifier/
I've had several users report they are receiving alerts for activity items in private group of which they are not members. This was awkward at first, because by following the link in the alert, they were actually able to see and comment on the activity in the group. The actual members of the group were pretty upset because they thought their group was private. I've locked down private group activity items so non-group members can't see them and get redirected back to their own wall. However, some users are still getting the alerts.
Since the users who received the alert were not members of the private group they obviously had not commented on the activity. I assume they were scooped up erroneously by the following (bp-activity-comment-notifier/core/functions.php
line 28), but I don't know why:
**
* @desc: find all the unique user_ids who have commented on this activity
*/
function ac_notifier_find_involved_persons ( $activity_id ) {
global $bp, $wpdb;
return $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT(user_id) FROM {$bp->activity->table_name} WHERE item_id = %d and user_id != %d ", $activity_id, get_current_user_id() ) ); //it finds all uses who commted on the activity
}
I tried this test case:
User A made group update in Public Group A. User B replied, then user A replied. User B received alert that User A had replied.
Then User A made group update in Private Group B. User C, a member of Private Group C, then made a reply and then User A another reply.
I thought maybe User B would get a notification for User A's activity in Private Group B due to following User A's activity in Public Group A. But that is not what happened (which is, of course, the way it's supposed to work).
So I don't know why some of my users are getting notified about activity in groups they don't belong to and therefore aren't involved in.
FYI I'm also using the bp-group-activity-notifier plugin. However, I'm pretty sure the notification they're receiving is generated by bp-activity-comment-notifier. But again, I can't reproduce it, so... :-(
Anyway, is there a way to use the ac_notifier_skip_notification
filter to check group_id against user_id for membership and to bail if the user_id is not connected to the group_id?
Hi,
I may have missed something: I can't mange to make this plugin work.
Disabled all other plugins but BuddyPress (v2.4.3) and BuddyPress Activity Comment Notifier (v1.1.2).
Switched theme for the default Twenty*
No error in log.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.