Skip to:

Opened 14 years ago

Closed 14 years ago

#2672 closed enhancement (worksforme)

Filter or Template Needed to Access Actitvity Stream Replies Directly

Reported by: paulhastings0's profile paulhastings0 Owned by:
Milestone: 1.5 Priority: major
Severity: Version:
Component: Activity Keywords: activity comments, activity replies, edit


I know of at least a couple of plugins that would be so much better off if there was direct access to activity stream replies.

Group Email Subscription
Edit Activity Stream

I know that this functionality would come in handy for other plugins as well. We should be able to access activity update replies just as easily as the activity updates themselves.

Change History (2)

#1 @DJPaul
14 years ago

From what perspective? If you have a reply item, you can find the parent activity item via item_id. And off the top of my head, you can use BP_Activity_Activity::get_child_comments to find the children from a parent activity item.

#2 @boonebgorges
14 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

If I understand the linked threads correctly, the problem is not that we can't access activity *children* directly, it's that, given an activity *reply*, we can't easily find the parent.

I'm playing around with item_id and secondary_item_id right now, and it looks like this is not in fact a problem. Generally speaking, an activity reply's item_id refers to the top item in its tree, while the secondary_item_id refers to its immediate parent. Imagine an activity tree like this
A - initial activity item
B - reply to A
C - reply to B

B's item_id and secondary_item_id both refer to A, since A is both the immediate parent and the oldest ancestor of B. C's item_id refers to A (its oldest ancestor) and its secondary_item_id refers to C (its parent).

Note: See TracTickets for help on using tickets.