Skip read items

This commit is contained in:
Peter Stuifzand 2018-03-28 02:21:54 +02:00
parent 6abae3be07
commit ce1463739c

View File

@ -179,6 +179,9 @@ func (b *memoryBackend) TimelineGet(after, before, channel string) microsub.Time
// Filter items with "published" date
for _, r := range results {
r["_is_read"] = b.wasRead(channel, r)
if r["_is_read"].(bool) {
continue
}
if uid, e := r["uid"]; e {
r["_id"] = hex.EncodeToString([]byte(uid.(string)))
}