@amityco/ts-sdk-react-native 7.34.1-b659daca.0 → 7.34.1-c8c8b1c.0
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/dist/index.cjs.js
CHANGED
|
@@ -18643,12 +18643,7 @@ const prepareReactionPayloadFromEvent = (event, payload) => {
|
|
|
18643
18643
|
const eventPrefix = event.split('.')[0]; // 'post' | 'comment'
|
|
18644
18644
|
const myReactions = getMyReactionsInCache(payload, eventPrefix);
|
|
18645
18645
|
const newMyReaction = remappingMyReaction(event, payload.reactor.userId, payload.reactor.reactionName, myReactions);
|
|
18646
|
-
|
|
18647
|
-
if (!('communities' in payload) || !payload.communities || !payload.communityUsers) {
|
|
18648
|
-
return newPayload;
|
|
18649
|
-
}
|
|
18650
|
-
const communities = updateMembershipStatus(payload.communities, payload.communityUsers);
|
|
18651
|
-
return Object.assign(Object.assign({}, newPayload), { communities });
|
|
18646
|
+
return rebuildPayload(payload, `${eventPrefix}s`, newMyReaction);
|
|
18652
18647
|
};
|
|
18653
18648
|
const prepareStoryReactionPayloadFormEvent = (event, payload) => {
|
|
18654
18649
|
var _a, _b;
|
|
@@ -19168,7 +19163,7 @@ const onPostReactionAdded = (callback) => {
|
|
|
19168
19163
|
else {
|
|
19169
19164
|
const processed = prepareReactionPayloadFromEvent('post.addReaction', payload);
|
|
19170
19165
|
const postPayload = __rest(processed, ["reactor"]);
|
|
19171
|
-
ingestInCache(postPayload
|
|
19166
|
+
ingestInCache(postPayload);
|
|
19172
19167
|
const post = pullFromCache(['post', 'get', payload.posts[0].postId]);
|
|
19173
19168
|
callback(post.data);
|
|
19174
19169
|
}
|
|
@@ -19200,7 +19195,7 @@ const onPostReactionRemoved = (callback) => {
|
|
|
19200
19195
|
else {
|
|
19201
19196
|
const processed = prepareReactionPayloadFromEvent('post.removeReaction', payload);
|
|
19202
19197
|
const postPayload = __rest(processed, ["reactor"]);
|
|
19203
|
-
ingestInCache(postPayload
|
|
19198
|
+
ingestInCache(postPayload);
|
|
19204
19199
|
const post = pullFromCache(['post', 'get', payload.posts[0].postId]);
|
|
19205
19200
|
callback(post.data);
|
|
19206
19201
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -18624,12 +18624,7 @@ const prepareReactionPayloadFromEvent = (event, payload) => {
|
|
|
18624
18624
|
const eventPrefix = event.split('.')[0]; // 'post' | 'comment'
|
|
18625
18625
|
const myReactions = getMyReactionsInCache(payload, eventPrefix);
|
|
18626
18626
|
const newMyReaction = remappingMyReaction(event, payload.reactor.userId, payload.reactor.reactionName, myReactions);
|
|
18627
|
-
|
|
18628
|
-
if (!('communities' in payload) || !payload.communities || !payload.communityUsers) {
|
|
18629
|
-
return newPayload;
|
|
18630
|
-
}
|
|
18631
|
-
const communities = updateMembershipStatus(payload.communities, payload.communityUsers);
|
|
18632
|
-
return Object.assign(Object.assign({}, newPayload), { communities });
|
|
18627
|
+
return rebuildPayload(payload, `${eventPrefix}s`, newMyReaction);
|
|
18633
18628
|
};
|
|
18634
18629
|
const prepareStoryReactionPayloadFormEvent = (event, payload) => {
|
|
18635
18630
|
var _a, _b;
|
|
@@ -19149,7 +19144,7 @@ const onPostReactionAdded = (callback) => {
|
|
|
19149
19144
|
else {
|
|
19150
19145
|
const processed = prepareReactionPayloadFromEvent('post.addReaction', payload);
|
|
19151
19146
|
const postPayload = __rest(processed, ["reactor"]);
|
|
19152
|
-
ingestInCache(postPayload
|
|
19147
|
+
ingestInCache(postPayload);
|
|
19153
19148
|
const post = pullFromCache(['post', 'get', payload.posts[0].postId]);
|
|
19154
19149
|
callback(post.data);
|
|
19155
19150
|
}
|
|
@@ -19181,7 +19176,7 @@ const onPostReactionRemoved = (callback) => {
|
|
|
19181
19176
|
else {
|
|
19182
19177
|
const processed = prepareReactionPayloadFromEvent('post.removeReaction', payload);
|
|
19183
19178
|
const postPayload = __rest(processed, ["reactor"]);
|
|
19184
|
-
ingestInCache(postPayload
|
|
19179
|
+
ingestInCache(postPayload);
|
|
19185
19180
|
const post = pullFromCache(['post', 'get', payload.posts[0].postId]);
|
|
19186
19181
|
callback(post.data);
|
|
19187
19182
|
}
|