You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great package! Very useful, easy to use, and well tested and documented.
Issue
Currently the FeedManager identifies a feed item as being new by comparing it to the existing Feed items with the following logic:
// if feed is RSS 2.x, check existence of 'guid'if(item.guid)returnentry.guid===item.guid;// if feed is Atom 1.x, check existence of 'id'if(item.id)returnentry.id===item.id;// default object with 'link' and 'title'returnentry.link===item.link&&entry.title===item.title;
In a perfect world, everyone who publishes an RSS or Atom feed would apply best practices. However, this is not the case for the feed I am consuming, which does not set a guid or id on items, so the title is used to determine whether an item is new or existing. The feed I'm consuming essentially publishes "updates" to existing items with the title unchanged and changes to various custom elements. Because the title stays the same, the FeedEmitter does not identify it as a new item and emit an event. As far as I can tell, there is no way for me to handle "updates" to these feed items.
Proposal
There are couple of solutions I that first come to mind that would solve the issue I'm having:
Option 1: Allow user to specify and override how a new item is identified (i.e. delegate the responsibility to a custom function)
Option 2: Emit a separate event for when an existing item is identified
I'm open to other solutions and willing to help out and implement it, but wanted to get buy-in and feedback before spending the time and effort doing so.
Anyways, thanks again for this very nice package.
The text was updated successfully, but these errors were encountered:
mikesouza
changed the title
Detection of updated feed items
Detection of new and updated feed items
Jun 30, 2021
feel free to submit a pr! Sadly, right now, any work i do is delayed behind getting approvals from filipe, so i'm not doing any additional work until I can get it set up so i can merge my own after others review it
Great package! Very useful, easy to use, and well tested and documented.
Issue
Currently the FeedManager identifies a feed item as being new by comparing it to the existing Feed items with the following logic:
In a perfect world, everyone who publishes an RSS or Atom feed would apply best practices. However, this is not the case for the feed I am consuming, which does not set a
guid
orid
on items, so thetitle
is used to determine whether an item is new or existing. The feed I'm consuming essentially publishes "updates" to existing items with thetitle
unchanged and changes to various custom elements. Because thetitle
stays the same, theFeedEmitter
does not identify it as a new item and emit an event. As far as I can tell, there is no way for me to handle "updates" to these feed items.Proposal
There are couple of solutions I that first come to mind that would solve the issue I'm having:
Option 1: Allow user to specify and override how a new item is identified (i.e. delegate the responsibility to a custom function)
Option 2: Emit a separate event for when an existing item is identified
I'm open to other solutions and willing to help out and implement it, but wanted to get buy-in and feedback before spending the time and effort doing so.
Anyways, thanks again for this very nice package.
The text was updated successfully, but these errors were encountered: