Tweets from users that blocking me should not be visible even via retweets but user stream send them without any filter. Since there is no related field on tweet or user object and the app cannot really call friendships/show API for each tweet, is there any good way to filter those tweets?
If i’m getting this right - you could use https://dev.twitter.com/rest/reference/get/blocks/ids to get a list of user IDs you’re blocking, then filter those out of the stream (since each tweet will have a user object in it with an id). You can get /blocks/ids and cache them - no need to request them frequently.
You could even extend this to filtering any mentions of users you’re blocking - tweet mention entities have user ids too.
Same thing with mutes https://dev.twitter.com/rest/reference/get/mutes/users/ids
“Users that blocking me” does not mean “users that blocked by me” unfortunately. I’m already using those APIs but I need another way to filter tweets from “users that blocking me”.
Ah yes you’re right - that’s very different.
There’s no way that i know of to get a list of all users that have blocked you - or get notified when someone blocks you. The way to do it would be like you described: slowly build up a list using /friendships/show (you won’t need to call friendships/show for each tweet if you keep a cache of user ids you’ve processed - just once for every unique user, but even then it’s an awkward one since it’s only 15 calls every 15 minutes)