From beef15fcb90faf153e13fcaf5cfe8e411f16c6b9 Mon Sep 17 00:00:00 2001 From: Anders Rune Jensen Date: Sat, 24 Oct 2020 21:51:20 +0200 Subject: [PATCH] Fix sync after following a feed you already have partial state for --- feed-syncer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/feed-syncer.js b/feed-syncer.js index 0a466d9..8ed0b1c 100644 --- a/feed-syncer.js +++ b/feed-syncer.js @@ -35,6 +35,11 @@ module.exports = function (partial, contacts) { pull.values(graph.following), pull.asyncMap((feed, cb) => { if (!partialState[feed] || !partialState[feed]['full']) { + + // we might already have partial state about the feed, + // so when we do a full sync we need to clear the state + delete SSB.state.feeds[feed] + pull( rpc.partialReplication.getFeed({ id: feed, seq: 0, keys: false }), pull.asyncMap(SSB.db.validateAndAdd),