[buddypress-trac] [BuddyPress Trac] #7331: display_comments=stream for bp_has_activities() doesn't work
buddypress-trac
noreply at wordpress.org
Mon Nov 7 02:42:01 UTC 2016
#7331: display_comments=stream for bp_has_activities() doesn't work
-------------------------------------+------------------
Reporter: slaFFik | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.8
Component: Activity | Version:
Severity: normal | Resolution:
Keywords: needs-patch 2nd-opinion |
-------------------------------------+------------------
Comment (by boonebgorges):
> IMO we need to fix this and use component of the parent item when saving
reply to an activity.
I don't think this will work. Activity comments have the following
signature:
{{{
'component' => 'activity',
'type' => 'activity_comment',
'item_id' => root-level ancestor activity ID
'secondary_item_id' => immediate parent activity ID
}}}
For example:
{{{
- A
- A1
- A1a
- A1b
- A2
- B
- B1
- B2
}}}
A1a has item_id A and secondary_item_id A1. Because A1's immediate parent
is also its root-level ancestor, it has item_id=A *and*
secondary_item_id=A.
You're correct that we should only set an activity item's component to
'groups' if we also store the group ID. We generally do this in `item_id`.
But making this change to `item_id` or `secondary_item_id` would break the
existing schema for activity comments.
As for the question of what to do about 'stream':
[attachment:7331.01.patch] doesn't seem like the right approach to me,
because it will *thread* the children rather than stream them, which is
not what 'stream' suggests, and will also result in duplicate children
outside the context of groups. There may be no way to solve this problem
for the group context without some sort of weird recursion. @r-a-y - as
someone who has done some thinking about filtering activity in different
contexts, do you have any brilliant ideas about this issue?
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7331#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list