I am creating a chatter post (FeedItem) from a trigger on a custom object after update of that object. I want that post to be visible on the user's profile that I have specified in the ParentId.
The FeedItem inserts.It is visible from the profile page of the context user.It is visible by both users from the chatter tab.The user specified in the ParentId appears to receive a notification via the bell.The problem is, it is NOT visible by the user specified in the ParentId of the FeedItem from that users profile when they navigate there from their avatar.
the feed Item shows in its header something like: ContextUser to ParentIDUserand everything about the post itself is fine. Its just this one visibility issue where the user who is being specified as the parent can't see this post from their profile view, and have to rely on the notification bell and/or chatter tab.
This is how I'm setting up the FeedItem in the code:
private static FeedItem createNewChatterPost(CustomObj triggerObject) { return new FeedItem( ParentId = triggerObject.someRelatedUserId, Body = 'a string message here', Visibility = 'Public', Status = 'Published' ); }
Any ideas?