@stream-io/feeds-client 0.3.8 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3862,7 +3862,7 @@ const getRateLimitFromResponseHeader = (response_headers) => {
3862
3862
  };
3863
3863
  return result;
3864
3864
  };
3865
- const version = "0.3.8";
3865
+ const version = "0.3.9";
3866
3866
  class ApiClient {
3867
3867
  constructor(apiKey, tokenManager, connectionIdManager, options) {
3868
3868
  this.apiKey = apiKey;
@@ -5582,6 +5582,12 @@ function handleActivityUpdated(payload, fromWs) {
5582
5582
  activities: currentActivities,
5583
5583
  pinned_activities: currentPinnedActivities
5584
5584
  } = this.currentState;
5585
+ const currentActivity = currentActivities?.find(
5586
+ (a) => a.id === payload.activity.id
5587
+ );
5588
+ if (!payload.activity.current_feed && payload.activity.feeds.length === 1 && currentActivity?.current_feed) {
5589
+ payload.activity.current_feed = currentActivity.current_feed;
5590
+ }
5585
5591
  const [result1, result2] = [
5586
5592
  this.hasActivity(payload.activity.id) ? updateActivityInState(payload, currentActivities) : void 0,
5587
5593
  updatePinnedActivityInState(payload, currentPinnedActivities)
@@ -7658,4 +7664,4 @@ exports.replaceUniqueArrayMerge = replaceUniqueArrayMerge;
7658
7664
  exports.shouldUpdateState = shouldUpdateState;
7659
7665
  exports.uniqueArrayMerge = uniqueArrayMerge;
7660
7666
  exports.updateEntityInArray = updateEntityInArray;
7661
- //# sourceMappingURL=feeds-client-CwioZBvA.js.map
7667
+ //# sourceMappingURL=feeds-client-DvR7ZYd1.js.map