@stream-io/feeds-client 0.3.9 → 0.3.10

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.3.10](https://github.com/GetStream/stream-feeds-js/compare/@stream-io/feeds-client-0.3.9...@stream-io/feeds-client-0.3.10) (2025-11-14)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * add missing current_feed when updating from WS event ([#164](https://github.com/GetStream/stream-feeds-js/issues/164)) ([3516b19](https://github.com/GetStream/stream-feeds-js/commit/3516b1939eeb9e966c65b1d7fd5980d305f96726))
11
+
5
12
  ## [0.3.9](https://github.com/GetStream/stream-feeds-js/compare/@stream-io/feeds-client-0.3.8...@stream-io/feeds-client-0.3.9) (2025-11-14)
6
13
 
7
14
 
package/dist/cjs/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const stateStore = require("@stream-io/state-store");
4
- const feedsClient = require("../feeds-client-DvR7ZYd1.js");
4
+ const feedsClient = require("../feeds-client-CqcICDIi.js");
5
5
  const loggerInternal = require("@stream-io/logger");
6
6
  const ChannelOwnCapability = {
7
7
  BAN_CHANNEL_MEMBERS: "ban-channel-members",
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const require$$0 = require("react");
4
4
  require("@stream-io/state-store");
5
- const feedsClient = require("../feeds-client-DvR7ZYd1.js");
5
+ const feedsClient = require("../feeds-client-CqcICDIi.js");
6
6
  require("axios");
7
7
  var shim = { exports: {} };
8
8
  var useSyncExternalStoreShim_production = {};
package/dist/es/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { StateStore } from "@stream-io/state-store";
2
2
  export * from "@stream-io/state-store";
3
- import { d as debounce } from "../feeds-client-CI-WG0y0.mjs";
4
- import { A, C, a, F, S, b, c, n, m, k, g, e, h, f, j, i, r, s, u, l } from "../feeds-client-CI-WG0y0.mjs";
3
+ import { d as debounce } from "../feeds-client-CRi0CGaj.mjs";
4
+ import { A, C, a, F, S, b, c, n, m, k, g, e, h, f, j, i, r, s, u, l } from "../feeds-client-CRi0CGaj.mjs";
5
5
  import { LogLevelEnum } from "@stream-io/logger";
6
6
  const ChannelOwnCapability = {
7
7
  BAN_CHANNEL_MEMBERS: "ban-channel-members",
@@ -1,6 +1,6 @@
1
1
  import require$$0, { useCallback, useMemo, useState, useEffect, createContext, useContext, useRef } from "react";
2
2
  import "@stream-io/state-store";
3
- import { F as FeedsClient, g as isCommentResponse, c as checkHasAnotherPage } from "../feeds-client-CI-WG0y0.mjs";
3
+ import { F as FeedsClient, g as isCommentResponse, c as checkHasAnotherPage } from "../feeds-client-CRi0CGaj.mjs";
4
4
  import "axios";
5
5
  var shim = { exports: {} };
6
6
  var useSyncExternalStoreShim_production = {};
@@ -3844,7 +3844,7 @@ const getRateLimitFromResponseHeader = (response_headers) => {
3844
3844
  };
3845
3845
  return result;
3846
3846
  };
3847
- const version = "0.3.9";
3847
+ const version = "0.3.10";
3848
3848
  class ApiClient {
3849
3849
  constructor(apiKey, tokenManager, connectionIdManager, options) {
3850
3850
  this.apiKey = apiKey;
@@ -5207,6 +5207,9 @@ const sharedUpdateActivity$6 = ({
5207
5207
  if (eventBelongsToCurrentUser) {
5208
5208
  newOwnBookmarks = [...newOwnBookmarks, event.bookmark];
5209
5209
  }
5210
+ if (!event.bookmark.activity.current_feed && event.bookmark.activity.feeds.length === 1 && currentActivity.current_feed) {
5211
+ event.bookmark.activity.current_feed = currentActivity.current_feed;
5212
+ }
5210
5213
  return {
5211
5214
  ...event.bookmark.activity,
5212
5215
  own_bookmarks: newOwnBookmarks,
@@ -5280,6 +5283,9 @@ const sharedUpdateActivity$5 = ({
5280
5283
  (bookmark) => !isSameBookmark(bookmark, event.bookmark)
5281
5284
  );
5282
5285
  }
5286
+ if (!event.bookmark.activity.current_feed && event.bookmark.activity.feeds.length === 1 && currentActivity.current_feed) {
5287
+ event.bookmark.activity.current_feed = currentActivity.current_feed;
5288
+ }
5283
5289
  return {
5284
5290
  ...event.bookmark.activity,
5285
5291
  own_bookmarks: newOwnBookmarks,
@@ -5515,6 +5521,9 @@ const updateActivity = ({
5515
5521
  currentActivity,
5516
5522
  newActivtiy
5517
5523
  }) => {
5524
+ if (!newActivtiy.current_feed && newActivtiy.feeds.length === 1 && currentActivity.current_feed) {
5525
+ newActivtiy.current_feed = currentActivity.current_feed;
5526
+ }
5518
5527
  return {
5519
5528
  ...newActivtiy,
5520
5529
  own_reactions: currentActivity.own_reactions,
@@ -7648,4 +7657,4 @@ export {
7648
7657
  shouldUpdateState as s,
7649
7658
  uniqueArrayMerge as u
7650
7659
  };
7651
- //# sourceMappingURL=feeds-client-CI-WG0y0.mjs.map
7660
+ //# sourceMappingURL=feeds-client-CRi0CGaj.mjs.map