How to remove admin's activity from Activities Feed?

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Established Member II

How to remove admin's activity from Activities Feed?

I would like to remove admin's activiti from Activities Feed Emails. How can I achieve that?

In my project, I copied LocalFeedGenerator.java and LocalFeedTaskProcessor.java and replaced import org.alfresco.repo.activities.feed.FeedTaskProcessor with import my.project.FeedTaskProcessor.

Then I created FeedTaskProcessor.java and inside the first for loop, I added

String postingUserId = activityPost.getUserId();
if(postingUserId.equals("admin")) {continue;}

For some reason, sometimes it works, sometimes not. Why is that?