When we process a block request from user A -> user B, we remove the follow edges between user A -> user B and user B -> user A, and then add a block edge from user A -> user B.
When we process an unblock request from user A -> user B, we remove the block edge from user A -> user B.
I imagine that the "Aleksey checked that he was following me again" was either client caching, or eventual consistency latency. There's no nightly batch job or anything doing that.
Source: I work on the social graph service at Twitter.
I described how the logic works above, but we're always subject to and victims of replication or cache-expiration latency. So it could have been that.
Maybe twitter could instead work on not being a terrible way to communicate coherent thoughts to each other instead.
Twitter is publishing data that is world visible and making it hard for individuals who have been snubbed to keep track of what everyone including them if they log out can in fact see by removing their bookmark to same.
The behavior of toggling block is weirder yet because the data is world published, you can read it, you can follow it but someone else has reached out and toggled the state of your account in some weird spooky action at a distance fashion that works only because it confuses people.
Well designed things work in a way that is predictable to users. Who would predict that your follow status on accounts would from the perspective of the user toggle itself randomly.
It's even worse that twitter sees purpose built for short toxic exchanges too short and badly organized for anyone to get each others point where the standard protocol is to disengage from anyone who disagrees and shout at all the people who believe exactly as you do.
"If a follow or friend relationship exists it is destroyed."