git ssb

2+

cel / scuttlebot.io



Tree: 6a055e1be48956691b060c261266f3d9e41250d9

Files: 6a055e1be48956691b060c261266f3d9e41250d9 / tmpl / docs / advanced / feed-receive-time-sort.md

578 bytesRaw

Messages ordered by receive-time

You can fetch all of the messages in your Scuttlebot DB, merged into one stream. To fetch them ordered by the timestamp at time-of-download, use 'createLogStream'.

var pull = require('pull-stream')
pull(
  sbot.createLogStream({ reverse: true }),
  pull.collect(function (err, msgs) { ... })
)
sbot log --reverse

The receive time of messages will differ for each user. The "log" stream's order will never be the same between two devices.

→ createLogStream API

Built with git-ssb-web