Bug #2191
closed
File upload to group doesn't register as activity?
Added by Matt Gold almost 12 years ago.
Updated almost 12 years ago.
Category name:
BuddyPress (misc)
Description
This morning, I uploaded a file to a hidden group, but that the most-recent activity metadata doesn't seem to have registered that as activity. Screenshots attached.
Files
- Assignee changed from Boone Gorges to Dominic Giglio
- Priority name changed from Normal to Low
- Target version set to 1.4.10
- Severity changed from Low impact to Trivial
Dom, this would be in the bp-group-documents plugin. Should be a place where it's doing something like groups_update_groupmeta( 'last_active', $time );
, but maybe it's not firing at the right time.
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
Boone,
We've talked previously about this plugin being re-written from the ground up so I didn't want to spend too much time on it. Basically it comes down to this: nowhere in buddypress-group-documents was the group's 'last_activity' meta value being updated in the DB.
All activity related updates are contained in the bp_group_documents_record_activity()
function on line 63 of buddypress-group-documents/include/activity.php
. All of the functions in that file call this function to update the DB, so I just added this one line:
groups_update_groupmeta( $bp->groups->current_group->id, 'last_activity', bp_core_current_time() );
right before the function returns. This addition updates the activity in my local env so I'm marking this as resolved, please re-open if you disagree or see something I've missed.
Commit: https://github.com/castiron/cac/commit/9ab9f841acd56b45bd4471fcbc26558f7039b0d9
Looks great. Thanks, Dom.
Also available in: Atom
PDF