Skip to:
Content

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#3192 closed enhancement (invalid)

replying to a nested activity item, whose root item is yours, results in duplicated activity stream entries

Reported by: alanchrishughes Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.2
Component: Activity Keywords:
Cc: contact@…

Description

Say a user posts something on their personal activity wall, realizes they misspelled something and immediately posts a *corrected spelling of the word in the reply/comment box below the post.

An activity post then appears directly above this post, saying that user just commented on the post. Seems a bit overkill.

I guess my suggestion would be to remove any activity updates to a user's personal activity wall when commenting/replying to something on his own wall.

Attachments (1)

screen-capture-3.png (36.1 KB) - added by DJPaul 3 years ago.
screenshot demonstrating issue

Download all attachments as: .zip

Change History (13)

comment:1 follow-up: DJPaul3 years ago

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

You couldn't differentiate an intentional follow-up comment (maybe they missed something) vs a correction. Hiding self-replies in the first case would not show the full discussion (even if it's a monologue) to another user, viewing that first person's activity stream; this would be detrimental to core, though is probably achievable by a plugin or other customisation.

comment:2 in reply to: ↑ 1 alanchrishughes3 years ago

Replying to DJPaul:

You couldn't differentiate an intentional follow-up comment (maybe they missed something) vs a correction. Hiding self-replies in the first case would not show the full discussion (even if it's a monologue) to another user, viewing that first person's activity stream; this would be detrimental to core, though is probably achievable by a plugin or other customisation.

I don't think you are following what I am saying or probably I just didn't explain it right. I am suggesting any time a user replies to a post of their own (not just specifically corrections) notifications of this reply SHOULD NOT show up in their activity stream.

Imagine I ask "Where is a good place to get Chinese food in Parkersburg?" I get 6 suggestions and I reply to each one. Now I have 6 pointless posts above my actual post, all saying "alanchrishughes replied to... alanchrishughes replied to.... alanchrishughes replied to..."

If that conversation goes on for any extended period of time, it wont even be on the first page any more because of all the reply notifications.

On Facebook each user has the option to turn off notification posts even for when you post or reply on other people's walls.

comment:3 DJPaul3 years ago

  • Keywords dev-feedback added
  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Summary changed from Not Sure How To Title - Activity Page Problem to replying to a nested activity item, whose root item is yours, results in duplicated activity stream entries
  • Version changed from 1.2.8 to 1.2

DJPaul3 years ago

screenshot demonstrating issue

comment:4 DJPaul3 years ago

Thanks for the explanation; I understand what you've mean and have attached a screenshot to this topic. I agree, it would be nice to not show these. If I were patching this, I'd probably just not generate these reply activities (rather than hiding them in the activity stream view).

Can anyone see problems with doing this?

comment:5 DJPaul3 years ago

Had a quick look at patching this and it looks like another hide_sitewide situation

comment:6 DJPaul3 years ago

  • Keywords dev-feedback removed
  • Milestone changed from Awaiting Review to Future Release

comment:7 Dennissmolek3 years ago

  • Cc contact@… added

I haven't dived into it yet, but could you simply hide sub level replies if the author's were the same? like,
Dennis said in reply to :Dennis
would not show..
I agree that its redundant. I've added this to the list of bugs I'm looking at..

EDIT
After looking into it, I think a discussion on weather or not to show this kind of activity on a stream is necessary at all.
For example, if I post an update, that should be in the stream. I reply to someone elses content that should as well. But if I post onto content that I already am the author for I think its redundant.
I'm not sure if hide sitewide hides the duplicate post on my own page..

Last edited 3 years ago by Dennissmolek (previous) (diff)

comment:8 alanchrishughes3 years ago

  • Severity set to normal

Would this be a pretty big project? I know next to nothing about programming and never know if ideas I have are simple or complicated.

comment:9 alanchrishughes3 years ago

I understand if it is a lot of work and you either don't like the idea or it will just take a year or two, but I just would like to know so I can decide what to do with a project I've been working on.

comment:10 boonebgorges3 years ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from reopened to closed

I would say that this is plugin territory. I don't think it makes sense to make this change in BuddyPress itself, since what you perceive as redundant in this case would not be redundant if the activity item being replied to was a few days old.

Essentially, this does what you want:

function bbg_remove_self_replies( $has_activities ) {
	global $activities_template;

	foreach( $activities_template->activities as $activity_key => $activity ) {
		if ( 'activity_comment' == $activity->type ) {
			// Get the parent item
			$parent_id = $activity->item_id;

			if ( empty( $activities_template->activity_parents[$parent_id] ) ) {
				return $has_activities;
			} else {
				$parent = $activities_template->activity_parents[$parent_id];
			}

			// Is the activity author the same as the parent author? If so, remove
			if ( $parent->user_id == $activity->user_id ) {
				unset( $activities_template->activities[$activity_key] );
			}
		}
	}

	// Reset indexes
	$activities_template->activities = array_values( $activities_template->activities );

	return $has_activities;
}
add_filter( 'bp_has_activities', 'bbg_remove_self_replies' );

comment:11 alanchrishughes3 years ago

Thank you Boone. This works but instead of adding a notification for every reply above the post, now below the post for each reply it creates a line with your avatar, comment button, a remove favorite button, and delete button. It also off sets the reply and delete links below the latest post and if you try to reply again without refreshing the page it gives you and error "There was an error posting that reply, please try again."

comment:12 alanchrishughes3 years ago

I really don't see how anyone could not see this as redundant unless you see the activity pages purely as lists of users' activity. The self notifications basically break any Facebook like conversation system and reduces Buddypress to just a complicated messageboard.

Note: See TracTickets for help on using tickets.