Commit e79a1c8ddcfc1950835039e14b72f92377eed48a
Use feed stream instead of log stream for global feed view
Sort updates by timestamp and filter out ones with blatantly invalid (future) timestampsCharles Lehner committed on 3/22/2016, 11:46:24 PM
Parent: fd5a0b93e7509a3157c5767fc08919dfd327aa32
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -351,11 +351,12 @@ | ||
351 | 351 | reverse: true, |
352 | 352 | id: feedId |
353 | 353 | } |
354 | 354 | return pull( |
355 | - feedId ? ssb.createUserStream(opts) : ssb.createLogStream(opts), | |
355 | + feedId ? ssb.createUserStream(opts) : ssb.createFeedStream(opts), | |
356 | 356 | pull.filter(function (msg) { |
357 | - return msg.value.content.type in msgTypes | |
357 | + return msg.value.content.type in msgTypes && | |
358 | + msg.value.timestamp < Date.now() | |
358 | 359 | }), |
359 | 360 | pull.take(20), |
360 | 361 | pull.asyncMap(function (msg, cb) { |
361 | 362 | about.getName(msg.value.author, function (err, name) { |
Built with git-ssb-web