GetStream / react-activity-feed

Stream React Activity Feed Components
https://getstream.io/react-activity-feed/
BSD 3-Clause "New" or "Revised" License
137 stars 83 forks source link

Allow FeedManager methods to accept activity type Activity | EnrichedActivity #303

Open MartinCupela opened 3 years ago

MartinCupela commented 3 years ago

FeedManager methods that accept activity as argument expect it to be of type Activity and not EnrichedActivity. On the other hand, the react-activity-feed components are working always with EnrichedActivity objects and that leads to type conflict when calling e.g. feed.onAddReaction inside the component. However these FeedManager methods could accept EnrichedActivity as well, without causing any issues executing the API calls. The proposed solution is to change the activity arg type to activity: Activity | EnrichedActivity. This should not lead to any breaking changes.

image (1) image .