-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Came across an issue where there is no way to hook into activity creation and then filter the activity item prepare value because the only hook is after the api gets the activity item.
The create and get items should return the exact same thing and that is not happening because the get_items function has filters / actions and the create _item does not. Probably should have a bp_rest_get_activity function with filters / hooks that both the create and get item function can use and then return the same data.
Mainly talking about here: https://github.com/buddypress/BP-REST/blob/master/includes/bp-activity/classes/class-bp-rest-activity-endpoint.php#L420
The item is added but there isn't a simplified way to hook into this add functionality before the bp_get_activity returns the data without being able to filter or add an action.
there is a hook after the returned data: "bp_rest_activity_create_item" which is kinda false because its not after creating its after the data is being returned.