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

buddypress-trac noreply at wordpress.org
Fri Dec 5 14:44:48 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 imath):

 Thanks a lot for your feedback DJPaul, boonebgorges and dontdream.

 I also like the idea of boonebgorges. So i made some tests and had a quick
 overview about the work r-a-y and boonebgorges have done on #4988: that's
 pretty awesome :)

 The main problem in our case, which is also a problem when we use WP Meta
 Queries is that, there's no way to have an 'OR' keyword between the main
 sql parts and the meta query sql parts. It's always a 'AND' keyword.

 Let's stay in BuddyPress: in the get method of BP_Activity_Activity,
 that's because the where clauses are "join( ' AND ', $where ) - ed";

 So to solve this in 6040_before_4988.03.patch, i've created an array
 containing all the sql parts and a new filter
 {{{'bp_activity_activities_sql_parts'}}} (on a side note, i think people
 would love to get such an array of sql parts when filtering
 {{{'bp_activity_paged_activities_sql'}}}: this would avoid preg_matching
 the query for instance).

 Then i was able to filter these parts and use a 'OR' keyword and take
 benefit of the great work being done in #4988, by using
 {{{BP_Activity_Query}}}.

 Once the patch applied ('''you'll need to first patch with
 6040_before_4988.03.patch and then with 4988.03.patch to avoid too many
 rejects'''), what dontdream told about the delete feature is happening:

 [[Image(https://farm8.staticflickr.com/7526/15951656842_7f4f1e53f6_z.jpg)]]

 The != initiator cannot delete the activity

 [[Image(https://farm8.staticflickr.com/7576/15952314505_499f11c72c_z.jpg)]]

 The == initiator can delete the activity.

 But we only have 1 public activity, displayed in each user's stream and in
 the activity directory stream > i like it :)

 I think it's not a big deal if the != initiator cannot delete the
 activity. The real big deal in this case from my point of view is that if
 the friendship is cancelled by the initiator (or the other one btw), the
 activities are not deleted so i think we should fix this bug first, reason
 why i've created #6055.

 NB: in 6040_before_4988.03.patch i've included the fix to delete the
 activities that i'm suggesting in
 [https://buddypress.trac.wordpress.org/attachment/ticket/6055/6055.patch
 6055.patch]

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


More information about the buddypress-trac mailing list