Commit d8af81c65c5bed954d2b1a3d6a6933217c57211a
whoops: fix handling broken contact messages
Matt McKegg committed on 3/17/2017, 4:14:46 AMParent: db863034370facd62379d62d56cfb98ddd96032d
Files changed
contact/obs.js | changed |
contact/obs.js | |||
---|---|---|---|
@@ -70,9 +70,9 @@ | |||
70 | 70 … | ||
71 | 71 … | function reduce (stream) { | |
72 | 72 … | var newestValues = {} | |
73 | 73 … | return MutantPullReduce(stream, (result, item) => { | |
74 | - if (!ref.isFeed(item.id)) return | ||
74 … | + if (!ref.isFeed(item.id)) return result // invalid message, skip this item | ||
75 | 75 … | newestValues[item.id] = newestValues[item.id] || 0 | |
76 | 76 … | if (newestValues[item.id] < item.timestamp) { | |
77 | 77 … | newestValues[item.id] = item.timestamp | |
78 | 78 … | if (item.value != null) { |
Built with git-ssb-web