@stream-io/feeds-client 0.3.8 → 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 +14 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/react-bindings.js +1 -1
- package/dist/es/index.mjs +2 -2
- package/dist/es/react-bindings.mjs +1 -1
- package/dist/{feeds-client-DVbsjKUf.mjs → feeds-client-CRi0CGaj.mjs} +17 -2
- package/dist/{feeds-client-DVbsjKUf.mjs.map → feeds-client-CRi0CGaj.mjs.map} +1 -1
- package/dist/{feeds-client-CwioZBvA.js → feeds-client-CqcICDIi.js} +17 -2
- package/dist/feeds-client-CqcICDIi.js.map +1 -0
- package/dist/types/feed/event-handlers/activity/handle-activity-updated.d.ts.map +1 -1
- package/dist/types/feed/event-handlers/activity-updater.d.ts.map +1 -1
- package/dist/types/feed/event-handlers/bookmark/handle-bookmark-added.d.ts.map +1 -1
- package/dist/types/feed/event-handlers/bookmark/handle-bookmark-deleted.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/feed/event-handlers/activity/handle-activity-updated.ts +11 -0
- package/src/feed/event-handlers/activity-updater.ts +8 -0
- package/src/feed/event-handlers/bookmark/handle-bookmark-added.ts +8 -0
- package/src/feed/event-handlers/bookmark/handle-bookmark-deleted.ts +8 -0
- package/dist/feeds-client-CwioZBvA.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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
|
+
|
|
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)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* add missing current_feed in activity.updated ([e6f0d94](https://github.com/GetStream/stream-feeds-js/commit/e6f0d94c9862549844df58a3152d3eb3177b43fb))
|
|
18
|
+
|
|
5
19
|
## [0.3.8](https://github.com/GetStream/stream-feeds-js/compare/@stream-io/feeds-client-0.3.7...@stream-io/feeds-client-0.3.8) (2025-11-12)
|
|
6
20
|
|
|
7
21
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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.
|
|
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,
|
|
@@ -5564,6 +5573,12 @@ function handleActivityUpdated(payload, fromWs) {
|
|
|
5564
5573
|
activities: currentActivities,
|
|
5565
5574
|
pinned_activities: currentPinnedActivities
|
|
5566
5575
|
} = this.currentState;
|
|
5576
|
+
const currentActivity = currentActivities?.find(
|
|
5577
|
+
(a) => a.id === payload.activity.id
|
|
5578
|
+
);
|
|
5579
|
+
if (!payload.activity.current_feed && payload.activity.feeds.length === 1 && currentActivity?.current_feed) {
|
|
5580
|
+
payload.activity.current_feed = currentActivity.current_feed;
|
|
5581
|
+
}
|
|
5567
5582
|
const [result1, result2] = [
|
|
5568
5583
|
this.hasActivity(payload.activity.id) ? updateActivityInState(payload, currentActivities) : void 0,
|
|
5569
5584
|
updatePinnedActivityInState(payload, currentPinnedActivities)
|
|
@@ -7642,4 +7657,4 @@ export {
|
|
|
7642
7657
|
shouldUpdateState as s,
|
|
7643
7658
|
uniqueArrayMerge as u
|
|
7644
7659
|
};
|
|
7645
|
-
//# sourceMappingURL=feeds-client-
|
|
7660
|
+
//# sourceMappingURL=feeds-client-CRi0CGaj.mjs.map
|