Bug #2040
closedRBE on BP Docs Edits?
Added by Matt Gold about 12 years ago. Updated about 12 years ago.
0%
Description
Just received a notification for a change I made in a BP doc and noticed that RBE seems active. If I reply to the notification message, where does the reply go -- does it become a comment on the document? And is this intended behavior, or did we just want RBE active on forums?
Files
Screen_Shot_2012-08-12_at_10.49.11_AM.png (63.6 KB) Screen_Shot_2012-08-12_at_10.49.11_AM.png | Matt Gold, 2012-08-12 10:51 AM |
Updated by Matt Gold about 12 years ago
Updated by Boone Gorges about 12 years ago
Ray can confirm, but I believe that replying to this email will post a comment to the "Matt edited..." activity item. As such, it is intended behavior.
Ray, do you have a filter in place so that we can easily white/blacklist activity types that have RBE functionality turned on? If not, this would be a small but helpful addition.
Matt, I don't think we should limit RBE to forum posts - private messages and public @-mentions are really ideal for RBE as well - but I do think it could make sense to limit RBE somewhat. Chris, maybe since you've recently done an inventory of our notification emails, you'd be willing to give a suggestion for which should and which should not have RBE turned on? (Also, I think we might consider the confusion that might be caused by having RBE available only for some items, and in that case whether it's best to just leave it on across the board.)
Updated by Matt Gold about 12 years ago
I agree that it should be turned on for private messages and public @ mentions, but I do wonder about docs. It seems to me that there would be some confusion about where replies would go; I'm pretty confident that regular users would expect a a reply to a document to be attached to the document in some way, rather than to be present on the activity stream (I don't know that most users are conscious of an "activity stream").
Interested in hearing Chris's thoughts, as well.
Updated by Boone Gorges about 12 years ago
- Target version changed from 1.4.1 to 1.4.2
Updated by Chris Stein about 12 years ago
Boone I hear you that it may be confusing to have RBE on some things and not others, and Matt with whether it will cause more confusion to have the reply go to an unexpected place.
Leaving out the emails where the logic is not problematic here are the cases I think we should consider:
When someone uploads a file to a group
When someone edits a file in a group
When someone creates a BP Doc
When someone edits a BP Doc
When someone comments on a BP Doc
When someone invites another person to a group
When someone requests friendship
With the five related to Files and Docs it is questionable whether RBE is necessary. I do think like Matt, that most people would expect all of the comments and replies to be in one place with the File or Doc. The second issue is that neither the file or the doc is included in the email so there is not much info on which someone could base a reply anyway.
With the group invite and friend request I think the assumption would be that an RBE would go directly to the person who made the invite/request. The other assumption would probably be that the reply was essentially a private message back to the inviter. I don't think either of these things creates an activity stream item (only the acceptance does right?) so I'm not sure what the alternative would be.
This is getting into a separate feature request, but the most useful in invite/request emails would be links to accept/deny right in the email.
My short term recommendation would be to remove RBE in all of the above cases. The logic would be that only when someone directly communicates with a person or group (message, forum, announcement), and when the text of the communication is in the email, would RBE be active.
Notification of a user's activity (edit doc, comment file, invite, request etc) would not have RBE active.
If we want to pursue accept/deny by email then it should be a separate feature request.
Finally, I just realized that I don't know what the status of RBE is for digest emails. I'm assuming that it's not workable and turned off for that too.
Updated by Matt Gold about 12 years ago
As usual, Chris, you've provided a fantastic and clarifying response. Thanks so much.
My short term recommendation would be to remove RBE in all of the above cases. The logic would be that only when someone directly communicates with a person or group (message, forum, announcement), and when the text of the communication is in the email, would RBE be active.
I'm in agreement with this. Boone and Ray, please let us know your thoughts.
Updated by Raymond Hoh about 12 years ago
- Status changed from Assigned to Resolved
Commit 81527f8 limits activity updates and activity comments for RBE activity use. Forum posts and private messages are unaffected.
Ray, do you have a filter in place so that we can easily white/blacklist activity types that have RBE functionality turned on? If not, this would be a small but helpful addition.
I've added a filter - 'bp_rbe_block_activity_item' - that devs can use to filter activity types from being parsed by RBE.
I've also added a hook for 3rd-party plugins to extend RBE's activity listener behavior - 'bp_rbe_extend_activity_listener'.
Let's say I wanted to enable BuddyPress Docs to allow people to reply via email on new docs or edited docs.
I would do something like this:
function bp_docs_enable_rbe( $listener, $item ) { if ( $item->type == 'bp_doc_created' || $item->type == 'bp_doc_edited' ) { $listener->item_id = $listener->secondary_item_id = $item->id; } } add_action( 'bp_rbe_extend_activity_listener', 'bp_docs_enable_rbe', 10, 2 );
This would add an activity comment to the BP Doc activity entry.
That should cover all the issues with this ticket. Boone, let me know what you think.
Finally, I just realized that I don't know what the status of RBE is for digest emails. I'm assuming that it's not workable and turned off for that too.
It would be close to impossible to get RBE to work for digest emails because it would be hard to determine where the comment should reside and on what thread. RBE shouldn't be enabled for digests. Let me know if this isn't the case, Chris.
Updated by Matt Gold about 12 years ago
Thank you, Ray! Boone, hopefully, you don't object to the line of reasoning Chris and I have laid out.
Updated by Boone Gorges about 12 years ago
- Status changed from Resolved to Assigned
Ray - Thanks, this is exactly what I was hoping for.
Matt - I am fine with Chris's list. I'll implement it for the 1.4.2 release.
Updated by Boone Gorges about 12 years ago
- Status changed from Assigned to Resolved
I've implemented the filter in https://github.com/castiron/cac/commit/bd6b896051c23b6d80762595dc2fd89fa9c9fa41
Updated by Raymond Hoh about 12 years ago
Hi Boone,
The filter you have written should be unnecessary as I've already restricted the activity component for RBE to the 'activity_update' and 'activity_comment' items by default now.
Forum posts are handled separately in the BP_Reply_By_Email::group_forum_listener() method.
What is the "new_status" activity item that is referenced in the filter?
Updated by Boone Gorges about 12 years ago
The filter you have written should be unnecessary
Ah, my bad. I'll remove it.
What is the "new_status" activity item that is referenced in the filter?
No idea. To make a whitelist I queried "SELECT DISTINCT type FROM wp_bp_activity", and that was one that showed up and I wasn't sure about. Must be created by a plugin - or maybe a super old version of BP?