[buddypress-trac] [BuddyPress Trac] #6040: Friendship activity missing

buddypress-trac noreply at wordpress.org
Thu Dec 4 19:20:30 UTC 2014


#6040: Friendship activity missing
------------------------------------+------------------------------
 Reporter:  dontdream               |       Owner:  imath
     Type:  defect (bug)            |      Status:  assigned
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Friends                 |     Version:  1.1
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+------------------------------

Comment (by boonebgorges):

 Like DJPaul, I'm hesitant. The original reasoning behind having two
 separate items is this:

 * When a new friendship is created, we should show a new activity item on
 each person's activity stream
 * User activity streams are basically of the form `bp_has_activities(
 'user_id' => bp_displayed_user_id() )`
 * But an activity item can only have one user_id, so we need two separate
 items
 * But if we have two separate items, we'll have near-duplicates in the
 sitewide stream, so we make one of them hide_sitewide

 The 'hide_sitewide' stuff is a huge can of worms. See #3857. I think that
 if we start changing this value on existing items, we're going to cause
 all sorts of problems for existing installations, especially those that
 are doing custom queries.

 Perhaps a better way forward is this: #4988 will make it possible to do
 more complex activity stream queries. So perhaps we can have a query that
 looks like this when looking at a user's activity stream: `show all
 activities where user_id = this user OR ( user_id != this_user &&
 component = 'friends' && item_id = this_user )`. Then, we stop creating
 the second 'hide_sitewide' item, and maybe even clear the old ones out of
 the database on upgrade (or at least stop returning them in normal
 queries).

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6040#comment:6>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list