diff --git a/cmd/eksterd/fetch.go b/cmd/eksterd/fetch.go index fe8e07a..f5d16ea 100644 --- a/cmd/eksterd/fetch.go +++ b/cmd/eksterd/fetch.go @@ -353,7 +353,7 @@ func (b *memoryBackend) ProcessContent(channel, fetchURL, contentType string, bo for _, item := range items { item.Read = false - err = b.channelAddItem(conn, channel, item) + err = b.channelAddItemWithMatcher(conn, channel, item) if err != nil { log.Printf("ERROR: %s\n", err) } diff --git a/cmd/eksterd/micropub.go b/cmd/eksterd/micropub.go index 53401ce..3d65bab 100644 --- a/cmd/eksterd/micropub.go +++ b/cmd/eksterd/micropub.go @@ -92,7 +92,7 @@ func (h *micropubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { item.Read = false id, _ := redis.Int(conn.Do("INCR", "source:"+sourceID+"next_id")) item.ID = fmt.Sprintf("%x", sha1.Sum([]byte(fmt.Sprintf("source:%s:%d", sourceID, id)))) - h.Backend.channelAddItem(conn, channel, item) + h.Backend.channelAddItemWithMatcher(conn, channel, item) err = h.Backend.updateChannelUnreadCount(conn, channel) if err != nil { log.Printf("error: while updating channel unread count for %s: %s\n", channel, err)