jsha / blocktogether

Share your blocks and subscribe to others'
GNU General Public License v3.0
330 stars 68 forks source link

Fix up blocks incorrectly labelled 'external' #178

Open jsha opened 9 years ago

jsha commented 9 years ago

In update-blocks, when an account shows up as newly blocked, the code attempts to figure out whether it was due to an internal cause (i.e. a subscription or eggblock). If so, it leaves the already recorded 'done' action and doesn't add another. Otherwise it adds a new entry listed with cause = 'external'.

Because the code looks back only for the last 24 hours, and previous versions have looked backed even less time, there are a number of Actions labeled 'external' that are duplicates of earlier ones with internal causes. This is a problem because it can inhibit auto-unblocking of those accounts if a subscribed account unblocks.

We should change the lookback code so it isn't limited by 24 hours, and should add some code to retroactively fix up the excess Actions.