Bug #2191
closedFile upload to group doesn't register as activity?
100%
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
Updated by Boone Gorges about 12 years ago
- 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.
Updated by Dominic Giglio about 12 years ago
- 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