@stream-io/feeds-client 0.2.17 → 0.2.18
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 +8 -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/{index-nq6SDtbt.js → index--koeDtxd.js} +147 -56
- package/dist/index--koeDtxd.js.map +1 -0
- package/dist/{index-BZL77zNq.mjs → index-Zde8UE5f.mjs} +147 -56
- package/dist/index-Zde8UE5f.mjs.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/common/real-time/StableWSConnection.d.ts +3 -3
- package/dist/types/feed/event-handlers/activity/handle-activity-added.d.ts +4 -3
- package/dist/types/feed/event-handlers/activity/handle-activity-added.d.ts.map +1 -1
- 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 +44 -0
- package/dist/types/feed/event-handlers/activity-updater.d.ts.map +1 -0
- package/dist/types/feed/event-handlers/add-aggregated-activities-to-state.d.ts +6 -0
- package/dist/types/feed/event-handlers/add-aggregated-activities-to-state.d.ts.map +1 -0
- package/dist/types/feed/event-handlers/index.d.ts +3 -1
- package/dist/types/feed/event-handlers/index.d.ts.map +1 -1
- package/dist/types/feed/event-handlers/{aggregated-feed/handle-aggregated-feed-updated.d.ts → notification-feed/handle-notification-feed-updated.d.ts} +2 -11
- package/dist/types/feed/event-handlers/notification-feed/handle-notification-feed-updated.d.ts.map +1 -0
- package/dist/types/feed/event-handlers/notification-feed/index.d.ts +2 -0
- package/dist/types/feed/event-handlers/notification-feed/index.d.ts.map +1 -0
- package/dist/types/feed/event-handlers/story-feeds/handle-story-feeds-updated.d.ts +15 -0
- package/dist/types/feed/event-handlers/story-feeds/handle-story-feeds-updated.d.ts.map +1 -0
- package/dist/types/feed/event-handlers/story-feeds/index.d.ts +2 -0
- package/dist/types/feed/event-handlers/story-feeds/index.d.ts.map +1 -0
- package/dist/types/feed/feed.d.ts +9 -3
- package/dist/types/feed/feed.d.ts.map +1 -1
- package/dist/types/feeds-client/feeds-client.d.ts +5 -3
- package/dist/types/feeds-client/feeds-client.d.ts.map +1 -1
- package/dist/types/gen/feeds/FeedsApi.d.ts.map +1 -1
- package/dist/types/gen/models/index.d.ts +42 -451
- package/dist/types/gen/models/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/feed/event-handlers/activity/handle-activity-added.test.ts +16 -5
- package/src/feed/event-handlers/activity/handle-activity-added.ts +9 -11
- package/src/feed/event-handlers/activity/handle-activity-updated.ts +8 -16
- package/src/feed/event-handlers/activity-updater.ts +15 -0
- package/src/feed/event-handlers/add-aggregated-activities-to-state.test.ts +510 -0
- package/src/feed/event-handlers/add-aggregated-activities-to-state.ts +72 -0
- package/src/feed/event-handlers/index.ts +3 -1
- package/src/feed/event-handlers/notification-feed/handle-notification-feed-updated.test.ts +182 -0
- package/src/feed/event-handlers/{aggregated-feed/handle-aggregated-feed-updated.ts → notification-feed/handle-notification-feed-updated.ts} +2 -94
- package/src/feed/event-handlers/notification-feed/index.ts +1 -0
- package/src/feed/event-handlers/story-feeds/handle-story-feeds-updated.test.ts +45 -0
- package/src/feed/event-handlers/story-feeds/handle-story-feeds-updated.ts +122 -0
- package/src/feed/event-handlers/story-feeds/index.ts +1 -0
- package/src/feed/feed.ts +12 -0
- package/src/feeds-client/feeds-client.ts +21 -3
- package/src/gen/feeds/FeedsApi.ts +5 -0
- package/src/gen/model-decoders/decoders.ts +10 -4
- package/src/gen/models/index.ts +75 -834
- package/src/test-utils/response-generators.ts +37 -1
- package/dist/index-BZL77zNq.mjs.map +0 -1
- package/dist/index-nq6SDtbt.js.map +0 -1
- package/dist/types/feed/event-handlers/aggregated-feed/handle-aggregated-feed-updated.d.ts.map +0 -1
- package/dist/types/feed/event-handlers/aggregated-feed/index.d.ts +0 -2
- package/dist/types/feed/event-handlers/aggregated-feed/index.d.ts.map +0 -1
- package/src/feed/event-handlers/activity/activity-utils.test.ts +0 -252
- package/src/feed/event-handlers/aggregated-feed/handle-aggregated-feed-updated.test.ts +0 -644
- package/src/feed/event-handlers/aggregated-feed/index.ts +0 -1
|
@@ -871,8 +871,9 @@ decoders.MessageResponse = (input) => {
|
|
|
871
871
|
decoders.ModerationCustomActionEvent = (input) => {
|
|
872
872
|
const typeMappings = {
|
|
873
873
|
created_at: { type: "DatetimeType", isSingle: true },
|
|
874
|
-
|
|
875
|
-
|
|
874
|
+
review_queue_item: { type: "ReviewQueueItemResponse", isSingle: true },
|
|
875
|
+
received_at: { type: "DatetimeType", isSingle: true },
|
|
876
|
+
message: { type: "MessageResponse", isSingle: true }
|
|
876
877
|
};
|
|
877
878
|
return decode(typeMappings, input);
|
|
878
879
|
};
|
|
@@ -895,8 +896,9 @@ decoders.ModerationFlaggedEvent = (input) => {
|
|
|
895
896
|
decoders.ModerationMarkReviewedEvent = (input) => {
|
|
896
897
|
const typeMappings = {
|
|
897
898
|
created_at: { type: "DatetimeType", isSingle: true },
|
|
898
|
-
|
|
899
|
-
|
|
899
|
+
item: { type: "ReviewQueueItemResponse", isSingle: true },
|
|
900
|
+
received_at: { type: "DatetimeType", isSingle: true },
|
|
901
|
+
message: { type: "MessageResponse", isSingle: true }
|
|
900
902
|
};
|
|
901
903
|
return decode(typeMappings, input);
|
|
902
904
|
};
|
|
@@ -1250,6 +1252,7 @@ decoders.StoriesFeedUpdatedEvent = (input) => {
|
|
|
1250
1252
|
const typeMappings = {
|
|
1251
1253
|
created_at: { type: "DatetimeType", isSingle: true },
|
|
1252
1254
|
received_at: { type: "DatetimeType", isSingle: true },
|
|
1255
|
+
activities: { type: "ActivityResponse", isSingle: false },
|
|
1253
1256
|
aggregated_activities: {
|
|
1254
1257
|
type: "AggregatedActivityResponse",
|
|
1255
1258
|
isSingle: false
|
|
@@ -1471,6 +1474,8 @@ class FeedsApi {
|
|
|
1471
1474
|
const body = {
|
|
1472
1475
|
name: request?.name,
|
|
1473
1476
|
words: request?.words,
|
|
1477
|
+
is_leet_check_enabled: request?.is_leet_check_enabled,
|
|
1478
|
+
is_plural_check_enabled: request?.is_plural_check_enabled,
|
|
1474
1479
|
team: request?.team,
|
|
1475
1480
|
type: request?.type
|
|
1476
1481
|
};
|
|
@@ -1506,6 +1511,8 @@ class FeedsApi {
|
|
|
1506
1511
|
name: request?.name
|
|
1507
1512
|
};
|
|
1508
1513
|
const body = {
|
|
1514
|
+
is_leet_check_enabled: request?.is_leet_check_enabled,
|
|
1515
|
+
is_plural_check_enabled: request?.is_plural_check_enabled,
|
|
1509
1516
|
team: request?.team,
|
|
1510
1517
|
words: request?.words
|
|
1511
1518
|
};
|
|
@@ -1702,7 +1709,8 @@ class FeedsApi {
|
|
|
1702
1709
|
mute_user: request?.mute_user,
|
|
1703
1710
|
reason: request?.reason,
|
|
1704
1711
|
report: request?.report,
|
|
1705
|
-
show_less: request?.show_less
|
|
1712
|
+
show_less: request?.show_less,
|
|
1713
|
+
show_more: request?.show_more
|
|
1706
1714
|
};
|
|
1707
1715
|
const response = await this.apiClient.sendRequest(
|
|
1708
1716
|
"POST",
|
|
@@ -3722,7 +3730,7 @@ const getRateLimitFromResponseHeader = (response_headers) => {
|
|
|
3722
3730
|
};
|
|
3723
3731
|
return result;
|
|
3724
3732
|
};
|
|
3725
|
-
const version = "0.2.
|
|
3733
|
+
const version = "0.2.18";
|
|
3726
3734
|
class ApiClient {
|
|
3727
3735
|
constructor(apiKey, tokenManager, connectionIdManager, options) {
|
|
3728
3736
|
this.apiKey = apiKey;
|
|
@@ -5288,19 +5296,16 @@ function handleBookmarkUpdated(event) {
|
|
|
5288
5296
|
}
|
|
5289
5297
|
}
|
|
5290
5298
|
function addActivitiesToState(newActivities, activities, position) {
|
|
5291
|
-
let result;
|
|
5292
5299
|
if (activities === void 0) {
|
|
5293
|
-
|
|
5294
|
-
result = {
|
|
5295
|
-
changed: true,
|
|
5296
|
-
activities
|
|
5297
|
-
};
|
|
5298
|
-
} else {
|
|
5299
|
-
result = {
|
|
5300
|
+
return {
|
|
5300
5301
|
changed: false,
|
|
5301
|
-
activities
|
|
5302
|
+
activities: []
|
|
5302
5303
|
};
|
|
5303
5304
|
}
|
|
5305
|
+
let result = {
|
|
5306
|
+
changed: false,
|
|
5307
|
+
activities
|
|
5308
|
+
};
|
|
5304
5309
|
const newActivitiesDeduplicated = [];
|
|
5305
5310
|
newActivities.forEach((newActivityResponse) => {
|
|
5306
5311
|
if (!this.hasActivity(newActivityResponse.id)) {
|
|
@@ -5322,7 +5327,7 @@ function handleActivityAdded(event) {
|
|
|
5322
5327
|
const result = addActivitiesToState.bind(this)(
|
|
5323
5328
|
[event.activity],
|
|
5324
5329
|
currentActivities,
|
|
5325
|
-
|
|
5330
|
+
this.currentState.addNewActivitiesTo
|
|
5326
5331
|
);
|
|
5327
5332
|
if (result.changed) {
|
|
5328
5333
|
this.client.hydratePollCache([event.activity]);
|
|
@@ -5378,22 +5383,23 @@ function handleActivityRemovedFromFeed(event) {
|
|
|
5378
5383
|
}
|
|
5379
5384
|
}
|
|
5380
5385
|
}
|
|
5381
|
-
const
|
|
5386
|
+
const updateActivity = ({
|
|
5382
5387
|
currentActivity,
|
|
5383
|
-
|
|
5388
|
+
newActivtiy
|
|
5384
5389
|
}) => {
|
|
5385
5390
|
return {
|
|
5386
|
-
...
|
|
5391
|
+
...newActivtiy,
|
|
5387
5392
|
own_reactions: currentActivity.own_reactions,
|
|
5388
5393
|
own_bookmarks: currentActivity.own_bookmarks
|
|
5389
5394
|
};
|
|
5390
5395
|
};
|
|
5396
|
+
const sharedUpdateActivity$3 = updateActivity;
|
|
5391
5397
|
const updateActivityInState = (event, activities) => updateEntityInArray({
|
|
5392
5398
|
entities: activities,
|
|
5393
5399
|
matcher: (activity) => activity.id === event.activity.id,
|
|
5394
5400
|
updater: (matchedActivity) => sharedUpdateActivity$3({
|
|
5395
5401
|
currentActivity: matchedActivity,
|
|
5396
|
-
event
|
|
5402
|
+
newActivtiy: event.activity
|
|
5397
5403
|
})
|
|
5398
5404
|
});
|
|
5399
5405
|
const updatePinnedActivityInState = (event, pinnedActivities) => updateEntityInArray({
|
|
@@ -5402,7 +5408,7 @@ const updatePinnedActivityInState = (event, pinnedActivities) => updateEntityInA
|
|
|
5402
5408
|
updater: (matchedPinnedActivity) => {
|
|
5403
5409
|
const newActivity = sharedUpdateActivity$3({
|
|
5404
5410
|
currentActivity: matchedPinnedActivity.activity,
|
|
5405
|
-
event
|
|
5411
|
+
newActivtiy: event.activity
|
|
5406
5412
|
});
|
|
5407
5413
|
if (newActivity === matchedPinnedActivity.activity) {
|
|
5408
5414
|
return matchedPinnedActivity;
|
|
@@ -5747,36 +5753,55 @@ const addAggregatedActivitiesToState = (newAggregatedActivities, aggregatedActiv
|
|
|
5747
5753
|
if (newAggregatedActivities.length === 0) {
|
|
5748
5754
|
result = {
|
|
5749
5755
|
changed: false,
|
|
5750
|
-
aggregated_activities: []
|
|
5756
|
+
aggregated_activities: aggregatedActivities ?? []
|
|
5751
5757
|
};
|
|
5752
5758
|
} else {
|
|
5753
5759
|
result = {
|
|
5754
5760
|
changed: true,
|
|
5755
5761
|
aggregated_activities: []
|
|
5756
5762
|
};
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
result.aggregated_activities = uniqueArrayMerge(
|
|
5761
|
-
newAggregatedActivities,
|
|
5762
|
-
aggregatedActivities ?? [],
|
|
5763
|
-
(a) => a.group
|
|
5764
|
-
);
|
|
5765
|
-
break;
|
|
5766
|
-
case "end":
|
|
5767
|
-
result.aggregated_activities = uniqueArrayMerge(
|
|
5768
|
-
aggregatedActivities ?? [],
|
|
5769
|
-
newAggregatedActivities,
|
|
5770
|
-
(a) => a.group
|
|
5763
|
+
newAggregatedActivities.forEach((newAggregatedActivity) => {
|
|
5764
|
+
const existingAggregatedActivity = aggregatedActivities?.find(
|
|
5765
|
+
(a) => a.group === newAggregatedActivity.group
|
|
5771
5766
|
);
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5767
|
+
if (existingAggregatedActivity) {
|
|
5768
|
+
for (let i = 0; i < newAggregatedActivity.activities.length; i++) {
|
|
5769
|
+
const activity = newAggregatedActivity.activities[i];
|
|
5770
|
+
const existingActivity = existingAggregatedActivity.activities.find(
|
|
5771
|
+
(a) => a.id === activity.id
|
|
5772
|
+
);
|
|
5773
|
+
if (existingActivity) {
|
|
5774
|
+
newAggregatedActivity.activities[i] = updateActivity({
|
|
5775
|
+
currentActivity: existingActivity,
|
|
5776
|
+
newActivtiy: activity
|
|
5777
|
+
});
|
|
5778
|
+
}
|
|
5779
|
+
}
|
|
5780
|
+
}
|
|
5781
|
+
});
|
|
5782
|
+
switch (position) {
|
|
5783
|
+
case "start":
|
|
5784
|
+
result.aggregated_activities = uniqueArrayMerge(
|
|
5785
|
+
newAggregatedActivities,
|
|
5786
|
+
aggregatedActivities ?? [],
|
|
5787
|
+
(a) => a.group
|
|
5788
|
+
);
|
|
5789
|
+
break;
|
|
5790
|
+
case "end":
|
|
5791
|
+
result.aggregated_activities = uniqueArrayMerge(
|
|
5792
|
+
aggregatedActivities ?? [],
|
|
5793
|
+
newAggregatedActivities,
|
|
5794
|
+
(a) => a.group
|
|
5795
|
+
);
|
|
5796
|
+
break;
|
|
5797
|
+
case "replace":
|
|
5798
|
+
result.aggregated_activities = replaceUniqueArrayMerge(
|
|
5799
|
+
aggregatedActivities ?? [],
|
|
5800
|
+
newAggregatedActivities,
|
|
5801
|
+
(a) => a.group
|
|
5802
|
+
);
|
|
5803
|
+
break;
|
|
5804
|
+
}
|
|
5780
5805
|
}
|
|
5781
5806
|
return result;
|
|
5782
5807
|
};
|
|
@@ -5802,7 +5827,7 @@ const updateNotificationStatus = (newNotificationStatus, currentNotificationStat
|
|
|
5802
5827
|
};
|
|
5803
5828
|
const updateNotificationFeedFromEvent = (event, currentAggregatedActivities, currentNotificationStatus) => {
|
|
5804
5829
|
const updates = {};
|
|
5805
|
-
if (event.notification_status
|
|
5830
|
+
if (event.notification_status) {
|
|
5806
5831
|
const notificationStatusResult = updateNotificationStatus(
|
|
5807
5832
|
event.notification_status,
|
|
5808
5833
|
currentNotificationStatus
|
|
@@ -5844,18 +5869,65 @@ function handleNotificationFeedUpdated(event) {
|
|
|
5844
5869
|
});
|
|
5845
5870
|
}
|
|
5846
5871
|
}
|
|
5847
|
-
|
|
5848
|
-
if (!
|
|
5872
|
+
const updateActivities = (activitiesToUpsert, currentActivities) => {
|
|
5873
|
+
if (!activitiesToUpsert || activitiesToUpsert.length === 0 || !currentActivities) {
|
|
5874
|
+
return {
|
|
5875
|
+
changed: false,
|
|
5876
|
+
activities: currentActivities ?? []
|
|
5877
|
+
};
|
|
5878
|
+
}
|
|
5879
|
+
const result = [];
|
|
5880
|
+
for (let i = 0; i < currentActivities.length; i++) {
|
|
5881
|
+
const activity = currentActivities[i];
|
|
5882
|
+
const updatedActivity = activitiesToUpsert.find(
|
|
5883
|
+
(a) => a.id === activity.id
|
|
5884
|
+
);
|
|
5885
|
+
if (updatedActivity) {
|
|
5886
|
+
result.push(
|
|
5887
|
+
updateActivity({
|
|
5888
|
+
currentActivity: activity,
|
|
5889
|
+
newActivtiy: updatedActivity
|
|
5890
|
+
})
|
|
5891
|
+
);
|
|
5892
|
+
} else {
|
|
5893
|
+
result.push(activity);
|
|
5894
|
+
}
|
|
5895
|
+
}
|
|
5896
|
+
return {
|
|
5897
|
+
changed: true,
|
|
5898
|
+
activities: result
|
|
5899
|
+
};
|
|
5900
|
+
};
|
|
5901
|
+
function updateStoriesFeedFromEvent(aggregatedActivities, activities, event) {
|
|
5902
|
+
if (!aggregatedActivities && event.aggregated_activities && event.aggregated_activities?.length > 0 || !activities && event.activities && event.activities?.length > 0) {
|
|
5849
5903
|
return {
|
|
5850
5904
|
changed: false
|
|
5851
5905
|
};
|
|
5852
5906
|
}
|
|
5907
|
+
const result = {
|
|
5908
|
+
changed: true,
|
|
5909
|
+
data: {
|
|
5910
|
+
aggregated_activities: aggregatedActivities,
|
|
5911
|
+
activities
|
|
5912
|
+
}
|
|
5913
|
+
};
|
|
5853
5914
|
if (event.aggregated_activities) {
|
|
5854
|
-
const
|
|
5915
|
+
const aggregatedActivitiesResult = addAggregatedActivitiesToState(
|
|
5855
5916
|
event.aggregated_activities,
|
|
5856
5917
|
aggregatedActivities,
|
|
5857
5918
|
"replace"
|
|
5858
5919
|
);
|
|
5920
|
+
if (aggregatedActivitiesResult.changed) {
|
|
5921
|
+
result.data.aggregated_activities = aggregatedActivitiesResult.aggregated_activities;
|
|
5922
|
+
}
|
|
5923
|
+
}
|
|
5924
|
+
if (event.activities) {
|
|
5925
|
+
const activitiesResult = updateActivities(event.activities, activities);
|
|
5926
|
+
if (activitiesResult.changed) {
|
|
5927
|
+
result.data.activities = activitiesResult.activities;
|
|
5928
|
+
}
|
|
5929
|
+
}
|
|
5930
|
+
if (event.aggregated_activities || event.activities) {
|
|
5859
5931
|
return result;
|
|
5860
5932
|
}
|
|
5861
5933
|
return {
|
|
@@ -5865,11 +5937,13 @@ function updateStoriesFeedFromEvent(aggregatedActivities, event) {
|
|
|
5865
5937
|
function handleStoriesFeedUpdated(event) {
|
|
5866
5938
|
const result = updateStoriesFeedFromEvent(
|
|
5867
5939
|
this.currentState.aggregated_activities,
|
|
5940
|
+
this.currentState.activities,
|
|
5868
5941
|
event
|
|
5869
5942
|
);
|
|
5870
5943
|
if (result.changed) {
|
|
5871
5944
|
this.state.partialNext({
|
|
5872
|
-
aggregated_activities: result.data?.aggregated_activities
|
|
5945
|
+
aggregated_activities: result.data?.aggregated_activities,
|
|
5946
|
+
activities: result.data?.activities
|
|
5873
5947
|
});
|
|
5874
5948
|
}
|
|
5875
5949
|
}
|
|
@@ -5880,7 +5954,7 @@ function handleWatchStopped() {
|
|
|
5880
5954
|
this.state.partialNext({ watch: false });
|
|
5881
5955
|
}
|
|
5882
5956
|
const _Feed = class _Feed extends FeedApi {
|
|
5883
|
-
constructor(client, groupId, id, data, watch = false) {
|
|
5957
|
+
constructor(client, groupId, id, data, watch = false, addNewActivitiesTo = "start") {
|
|
5884
5958
|
super(client, groupId, id);
|
|
5885
5959
|
this.indexedActivityIds = /* @__PURE__ */ new Set();
|
|
5886
5960
|
this.stateUpdateQueue = /* @__PURE__ */ new Set();
|
|
@@ -5948,7 +6022,8 @@ const _Feed = class _Feed extends FeedApi {
|
|
|
5948
6022
|
is_loading: false,
|
|
5949
6023
|
is_loading_activities: false,
|
|
5950
6024
|
comments_by_entity_id: {},
|
|
5951
|
-
watch
|
|
6025
|
+
watch,
|
|
6026
|
+
addNewActivitiesTo
|
|
5952
6027
|
});
|
|
5953
6028
|
this.client = client;
|
|
5954
6029
|
this.state.subscribeWithSelector(
|
|
@@ -5969,6 +6044,9 @@ const _Feed = class _Feed extends FeedApi {
|
|
|
5969
6044
|
get currentState() {
|
|
5970
6045
|
return this.state.getLatestValue();
|
|
5971
6046
|
}
|
|
6047
|
+
set addNewActivitiesTo(value) {
|
|
6048
|
+
this.state.partialNext({ addNewActivitiesTo: value });
|
|
6049
|
+
}
|
|
5972
6050
|
hasActivity(activityId) {
|
|
5973
6051
|
return this.indexedActivityIds.has(activityId);
|
|
5974
6052
|
}
|
|
@@ -6675,8 +6753,14 @@ class FeedsClient extends FeedsApi {
|
|
|
6675
6753
|
};
|
|
6676
6754
|
this.on = this.eventDispatcher.on;
|
|
6677
6755
|
this.off = this.eventDispatcher.off;
|
|
6678
|
-
this.feed = (groupId, id) => {
|
|
6679
|
-
return this.getOrCreateActiveFeed(
|
|
6756
|
+
this.feed = (groupId, id, options2) => {
|
|
6757
|
+
return this.getOrCreateActiveFeed(
|
|
6758
|
+
groupId,
|
|
6759
|
+
id,
|
|
6760
|
+
void 0,
|
|
6761
|
+
void 0,
|
|
6762
|
+
options2?.addNewActivitiesTo
|
|
6763
|
+
);
|
|
6680
6764
|
};
|
|
6681
6765
|
this.updateNetworkConnectionStatus = (event) => {
|
|
6682
6766
|
const networkEvent = {
|
|
@@ -6685,10 +6769,17 @@ class FeedsClient extends FeedsApi {
|
|
|
6685
6769
|
};
|
|
6686
6770
|
this.eventDispatcher.dispatch(networkEvent);
|
|
6687
6771
|
};
|
|
6688
|
-
this.getOrCreateActiveFeed = (group, id, data, watch) => {
|
|
6772
|
+
this.getOrCreateActiveFeed = (group, id, data, watch, addNewActivitiesTo) => {
|
|
6689
6773
|
const fid = `${group}:${id}`;
|
|
6690
6774
|
if (!this.activeFeeds[fid]) {
|
|
6691
|
-
this.activeFeeds[fid] = new Feed(
|
|
6775
|
+
this.activeFeeds[fid] = new Feed(
|
|
6776
|
+
this,
|
|
6777
|
+
group,
|
|
6778
|
+
id,
|
|
6779
|
+
data,
|
|
6780
|
+
watch,
|
|
6781
|
+
addNewActivitiesTo
|
|
6782
|
+
);
|
|
6692
6783
|
}
|
|
6693
6784
|
const feed = this.activeFeeds[fid];
|
|
6694
6785
|
if (!feed.currentState.watch) {
|
|
@@ -7003,4 +7094,4 @@ export {
|
|
|
7003
7094
|
shouldUpdateState as s,
|
|
7004
7095
|
uniqueArrayMerge as u
|
|
7005
7096
|
};
|
|
7006
|
-
//# sourceMappingURL=index-
|
|
7097
|
+
//# sourceMappingURL=index-Zde8UE5f.mjs.map
|