Files: 6b0e3d2a1e43d3efa7bfab274588c5b8acd70f16 / README.md
765 bytesRaw
ssb-unread
A scuttlebot plugin which tracks read / unread state of all received messages in a mutable level db. The intention is to provide a persistent store which can be referenced and contributed to by a plurality of client interfaces.
Install
var sbot = require('scuttlebot')
.use(require('scuttlebot/plugins/master'))
.use(require('scuttlebot/plugins/gossip'))
.use(require('scuttlebot/plugins/replicate'))
.use(require('scuttlebot/plugins/invite'))
.use(require('scuttlebot/plugins/local'))
.use(require('ssb-unread')) // <<
.call(null, config)
API
sbot.unread.isRead(key, cb)
provide a message key and get a boolean response back in the callback
sbot.unread.markRead(key, cb)
mark a message key as read
Built with git-ssb-web