WIP: Remove half-conversations from timeline.
A half-conversation is a post by someone you are following but they are replying to someone you are not following. Some people seem to like these, but others find them annoying, and it takes a lot of mental energy to filter them out.
Previous attempts did this in the DB and had a lot of performance overhead. However, on the timeline load, we already have the list of users being followed, so in that case this adds no DB overhead. In the case of the streaming API, we don't have that list, so we have to fetch it, adding some load.
I wrote this patch completely for my own personal use, so I cut a few corners and the code quality isn't great. But if it would be accepted into Pleroma I would be happy to improve it.
The first thing is that it would probably need to be configurable. I know how to do per-instance config, but this would probably need to be set on a per-user basis, and I have no idea how to do that. Pointers to examples welcome. I would need someone else to handle the frontend change to expose the config setting in the user interface.
There is one section where I call User.following and get back a list of strings like "https://botsin.space/users/pengbot/followers" where the list I want is I "https://botsin.space/users/pengbot"; so I do a String.replace. Tho it gets the job done, this is probably not the right solution; I should probably be calling a different function, but I don't understand why User.following returns a list of collection URLs instead of a list of user URLs.
This feature also would need tests; for personal purposes I found it easier to test manually, but that's not good enough for mainline.