Commit aefe1c57d403d6caf0ca29793121221ed00ff9cf
replicate needs a way to switch off following
Dominic Tarr committed on 5/27/2017, 9:05:58 AMParent: 526c3b3694629092893d9152b42e5c2ff86e2814
Files changed
plugins/replicate/legacy.js | changed |
plugins/replicate/legacy.js | ||
---|---|---|
@@ -77,10 +77,16 @@ | ||
77 | 77 | var lastProgress = null |
78 | 78 | |
79 | 79 | var replicate = {} |
80 | 80 | |
81 | - function request (id) { | |
82 | - if(!replicate[id]) { | |
81 | + function request (id, unfollow) { | |
82 | + if(unfollow === false) { | |
83 | + if(replicate[id]) { | |
84 | + delete replicate[id] | |
85 | + newPeers({id:id, sequence: -1}) | |
86 | + } | |
87 | + } | |
88 | + else if(!replicate[id]) { | |
83 | 89 | replicate[id] = true |
84 | 90 | newPeers({id:id, sequence: toSend[id] || 0}) |
85 | 91 | } |
86 | 92 | } |
@@ -364,4 +370,5 @@ | ||
364 | 370 | } |
365 | 371 | |
366 | 372 | |
367 | 373 | |
374 | + |
Built with git-ssb-web