Given a ContentDocument, I need a way to use SOQL to find any FeedItems that the ContentDocument may be related to.
I hoped that ContentDocumentLink would work, but that just seems to give me the case and the user, but not the actual post in the feed.
I tried to do a simple query on FeedItem to see if I can just get it from RelatedRecordId
Select Id FROM FeedItem Where RelatedRecordId = '123AAA'
but then I get the error field "'RelatedRecordId' can not be filtered in a query call"
I cannot think of any other way to get to the FeedItems.