Test with marking item as read

This commit is contained in:
Peter Stuifzand 2018-03-28 01:22:11 +02:00
parent 3fd7644fb2
commit 37329ffd8d

View File

@ -177,8 +177,12 @@ func (b *memoryBackend) TimelineGet(after, before, channel string) microsub.Time
// Filter items with "published" date
for _, r := range results {
if b.wasRead(channel, r) {
continue
r["_read"] = b.wasRead(channel, r)
if uid, e := r["uid"]; e {
r["_id"] = uid
}
if uid, e := r["url"]; e {
r["_id"] = uid
}
if _, e := r["published"]; e {