@amityco/ts-sdk 6.20.1-d1f644e.0 → 6.20.1
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/.env +26 -26
- package/dist/@types/core/events.d.ts +7 -7
- package/dist/@types/core/events.d.ts.map +1 -1
- package/dist/@types/core/model.d.ts +2 -2
- package/dist/@types/core/model.d.ts.map +1 -1
- package/dist/@types/core/payload.d.ts +2 -2
- package/dist/@types/core/payload.d.ts.map +1 -1
- package/dist/@types/domains/reaction.d.ts +4 -8
- package/dist/@types/domains/reaction.d.ts.map +1 -1
- package/dist/client/api/login.d.ts.map +1 -1
- package/dist/commentRepository/observers/getComments.d.ts.map +1 -1
- package/dist/core/events.d.ts +3 -3
- package/dist/core/events.d.ts.map +1 -1
- package/dist/index.cjs.js +18 -31
- package/dist/index.esm.js +18 -31
- package/dist/index.umd.js +2 -2
- package/dist/messageRepository/utils/prepareMessagePayload.d.ts +1 -1
- package/dist/messageRepository/utils/prepareMessagePayload.d.ts.map +1 -1
- package/dist/reactionRepository/api/addReaction.d.ts +2 -2
- package/dist/reactionRepository/api/addReaction.d.ts.map +1 -1
- package/dist/reactionRepository/api/queryReactor.d.ts +3 -3
- package/dist/reactionRepository/api/queryReactor.d.ts.map +1 -1
- package/dist/reactionRepository/api/removeReaction.d.ts +2 -2
- package/dist/reactionRepository/api/removeReaction.d.ts.map +1 -1
- package/dist/reactionRepository/events/onReactorAdded.d.ts +2 -2
- package/dist/reactionRepository/events/onReactorAdded.d.ts.map +1 -1
- package/dist/reactionRepository/events/onReactorRemoved.d.ts +2 -2
- package/dist/reactionRepository/events/onReactorRemoved.d.ts.map +1 -1
- package/dist/reactionRepository/observers/getReactions.d.ts +1 -1
- package/dist/reactionRepository/observers/getReactions.d.ts.map +1 -1
- package/dist/reactionRepository/utils/prepareMessagePayloadForCache.d.ts +1 -1
- package/dist/reactionRepository/utils/prepareMessagePayloadForCache.d.ts.map +1 -1
- package/dist/streamRepository/events/onStreamStopped.d.ts.map +1 -1
- package/dist/utils/linkedObject/index.d.ts +0 -1
- package/dist/utils/linkedObject/index.d.ts.map +1 -1
- package/dist/utils/tests/dummy/reaction.d.ts +1 -1
- package/dist/utils/tests/dummy/reaction.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/@types/core/events.ts +7 -7
- package/src/@types/core/model.ts +2 -2
- package/src/@types/core/payload.ts +2 -2
- package/src/@types/domains/reaction.ts +4 -10
- package/src/client/api/login.ts +3 -1
- package/src/commentRepository/events/onCommentReactionAdded.ts +1 -1
- package/src/commentRepository/events/onCommentReactionRemoved.ts +1 -1
- package/src/commentRepository/observers/getComments.ts +4 -5
- package/src/commentRepository/observers/tests/getComment.test.ts +2 -2
- package/src/core/events.ts +0 -4
- package/src/messageRepository/utils/prepareMessagePayload.ts +2 -2
- package/src/postRepository/observers/tests/getPost.test.ts +1 -1
- package/src/postRepository/observers/tests/getPosts.test.ts +1 -1
- package/src/reactionRepository/api/addReaction.ts +2 -2
- package/src/reactionRepository/api/queryReactor.ts +3 -3
- package/src/reactionRepository/api/removeReaction.ts +2 -2
- package/src/reactionRepository/events/onReactorAdded.ts +5 -5
- package/src/reactionRepository/events/onReactorRemoved.ts +5 -5
- package/src/reactionRepository/observers/getReactions.ts +16 -18
- package/src/reactionRepository/utils/prepareMessagePayloadForCache.ts +1 -1
- package/src/streamRepository/events/onStreamRecorded.ts +1 -1
- package/src/streamRepository/events/onStreamStarted.ts +1 -1
- package/src/streamRepository/events/onStreamStopped.ts +1 -6
- package/src/utils/linkedObject/index.ts +0 -2
- package/src/utils/tests/dummy/reaction.ts +1 -1
- package/dist/utils/linkedObject/reactorLinkedObject.d.ts +0 -2
- package/dist/utils/linkedObject/reactorLinkedObject.d.ts.map +0 -1
- package/src/utils/linkedObject/reactorLinkedObject.ts +0 -13
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function convertFromRaw(message: Amity.RawMessage, reactors?: Amity.
|
|
1
|
+
export declare function convertFromRaw(message: Amity.RawMessage, reactors?: Amity.Reactor[], event?: keyof Amity.MqttMessageEvents): Amity.InternalMessage;
|
|
2
2
|
export declare const prepareMessagePayload: (payload: Amity.MessagePayload, event?: keyof Amity.MqttMessageEvents) => Promise<Amity.ProcessedMessagePayload>;
|
|
3
3
|
declare type RawQueryMessages = Omit<Amity.QueryMessages, 'page' | 'sortBy' | 'subChannelId' | 'tags' | 'includeDeleted' | 'aroundMessageId' | 'dataType' | 'includingTags' | 'excludingTags'> & {
|
|
4
4
|
includeTags?: Amity.QueryMessages['includingTags'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareMessagePayload.d.ts","sourceRoot":"","sources":["../../../src/messageRepository/utils/prepareMessagePayload.ts"],"names":[],"mappings":"AAYA,wBAAgB,cAAc,CAC5B,OAAO,EAAE,KAAK,CAAC,UAAU,EACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"prepareMessagePayload.d.ts","sourceRoot":"","sources":["../../../src/messageRepository/utils/prepareMessagePayload.ts"],"names":[],"mappings":"AAYA,wBAAgB,cAAc,CAC5B,OAAO,EAAE,KAAK,CAAC,UAAU,EACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,OAAO,EAAE,EAC1B,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,iBAAiB,GACpC,KAAK,CAAC,eAAe,CAkEvB;AAWD,eAAO,MAAM,qBAAqB,YACvB,MAAM,cAAc,UACrB,MAAM,MAAM,iBAAiB,KACpC,QAAQ,MAAM,uBAAuB,CA0CvC,CAAC;AAEF,aAAK,gBAAgB,GAAG,IAAI,CAC1B,KAAK,CAAC,aAAa,EAIjB,MAAM,GACN,QAAQ,GACR,cAAc,GACd,MAAM,GACN,gBAAgB,GAChB,iBAAiB,GACjB,UAAU,GACV,eAAe,GACf,eAAe,CAClB,GAAG;IACF,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IACnD,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC;IACnD,SAAS,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACvC,aAAa,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC;IACpC,OAAO,EAAE;QACP,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACvC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;KACrC,CAAC;CACH,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC5B,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,GAAG,IAAI,EACR,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAc9C;AAED,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,YAAY,EACZ,IAAI,EACJ,aAAa,EACb,aAAa,EACb,cAAc,EACd,eAAe,EACf,KAAK,EACL,IAAI,EACJ,GAAG,IAAI,EACR,EAAE,KAAK,CAAC,sBAAsB,GAAG,gBAAgB,CA6BjD"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* @async
|
|
16
16
|
* */
|
|
17
17
|
export declare const addReaction: {
|
|
18
|
-
(referenceType: Amity.Reaction['referenceType'], referenceId: Amity.Reaction['referenceId'], reactionName: Amity.
|
|
18
|
+
(referenceType: Amity.Reaction['referenceType'], referenceId: Amity.Reaction['referenceId'], reactionName: Amity.Reactor['reactionName']): Promise<boolean>;
|
|
19
19
|
/**
|
|
20
20
|
* ```js
|
|
21
21
|
* import { addReaction } from '@amityco/ts-sdk'
|
|
@@ -31,6 +31,6 @@ export declare const addReaction: {
|
|
|
31
31
|
*
|
|
32
32
|
* @category Reaction API
|
|
33
33
|
* */
|
|
34
|
-
optimistically(referenceType: Amity.ReactableType, referenceId: Amity.Reaction['referenceId'], reactionName: Amity.
|
|
34
|
+
optimistically(referenceType: Amity.ReactableType, referenceId: Amity.Reaction['referenceId'], reactionName: Amity.Reactor['reactionName']): boolean | undefined;
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=addReaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addReaction.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/api/addReaction.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;KAeK;AACL,eAAO,MAAM,WAAW;oBACP,MAAM,QAAQ,CAAC,eAAe,CAAC,eACjC,MAAM,QAAQ,CAAC,aAAa,CAAC,gBAC5B,MAAM,
|
|
1
|
+
{"version":3,"file":"addReaction.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/api/addReaction.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;KAeK;AACL,eAAO,MAAM,WAAW;oBACP,MAAM,QAAQ,CAAC,eAAe,CAAC,eACjC,MAAM,QAAQ,CAAC,aAAa,CAAC,gBAC5B,MAAM,OAAO,CAAC,cAAc,CAAC,GAC1C,QAAQ,OAAO,CAAC;IA8BnB;;;;;;;;;;;;;;SAcK;kCAEY,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,gBAC5B,MAAM,OAAO,CAAC,cAAc,CAAC,GAC1C,OAAO,GAAG,SAAS;CAtBrB,CAAC"}
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
* })
|
|
8
8
|
* ```
|
|
9
9
|
*
|
|
10
|
-
* Queries a paginable list of {@link Amity.
|
|
10
|
+
* Queries a paginable list of {@link Amity.Reactor} objects
|
|
11
11
|
*
|
|
12
12
|
* @param query The query parameters
|
|
13
|
-
* @returns A page of {@link Amity.
|
|
13
|
+
* @returns A page of {@link Amity.Reactor} objects
|
|
14
14
|
*
|
|
15
15
|
* @reaction Reaction API
|
|
16
16
|
* @async
|
|
17
17
|
* */
|
|
18
|
-
export declare const queryReactor: (query: Amity.QueryReactions) => Promise<Amity.Paged<Amity.
|
|
18
|
+
export declare const queryReactor: (query: Amity.QueryReactions) => Promise<Amity.Paged<Amity.Reactor, Amity.Page<string>>>;
|
|
19
19
|
//# sourceMappingURL=queryReactor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryReactor.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/api/queryReactor.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;KAgBK;AACL,eAAO,MAAM,YAAY,UAChB,MAAM,cAAc,KAC1B,QAAQ,MAAM,KAAK,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"queryReactor.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/api/queryReactor.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;KAgBK;AACL,eAAO,MAAM,YAAY,UAChB,MAAM,cAAc,KAC1B,QAAQ,MAAM,KAAK,CAAC,MAAM,OAAO,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC,CAOxD,CAAC"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* @async
|
|
16
16
|
* */
|
|
17
17
|
export declare const removeReaction: {
|
|
18
|
-
(referenceType: Amity.Reaction['referenceType'], referenceId: Amity.Reaction['referenceId'], reactionName: Amity.
|
|
18
|
+
(referenceType: Amity.Reaction['referenceType'], referenceId: Amity.Reaction['referenceId'], reactionName: Amity.Reactor['reactionName']): Promise<boolean>;
|
|
19
19
|
/**
|
|
20
20
|
* ```js
|
|
21
21
|
* import { removeReaction } from '@amityco/ts-sdk'
|
|
@@ -31,6 +31,6 @@ export declare const removeReaction: {
|
|
|
31
31
|
*
|
|
32
32
|
* @category Reaction API
|
|
33
33
|
* */
|
|
34
|
-
optimistically(referenceType: Amity.ReactableType, referenceId: Amity.Reaction['referenceId'], reactionName: Amity.
|
|
34
|
+
optimistically(referenceType: Amity.ReactableType, referenceId: Amity.Reaction['referenceId'], reactionName: Amity.Reactor['reactionName']): boolean | undefined;
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=removeReaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeReaction.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/api/removeReaction.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;KAeK;AACL,eAAO,MAAM,cAAc;oBACV,MAAM,QAAQ,CAAC,eAAe,CAAC,eACjC,MAAM,QAAQ,CAAC,aAAa,CAAC,gBAC5B,MAAM,
|
|
1
|
+
{"version":3,"file":"removeReaction.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/api/removeReaction.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;KAeK;AACL,eAAO,MAAM,cAAc;oBACV,MAAM,QAAQ,CAAC,eAAe,CAAC,eACjC,MAAM,QAAQ,CAAC,aAAa,CAAC,gBAC5B,MAAM,OAAO,CAAC,cAAc,CAAC,GAC1C,QAAQ,OAAO,CAAC;IAgCnB;;;;;;;;;;;;;;SAcK;kCAEY,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,gBAC5B,MAAM,OAAO,CAAC,cAAc,CAAC,GAC1C,OAAO,GAAG,SAAS;CAtBrB,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* })
|
|
7
7
|
* ```
|
|
8
8
|
*
|
|
9
|
-
* Fired when an {@link Amity.
|
|
9
|
+
* Fired when an {@link Amity.Reactor} has been added
|
|
10
10
|
*
|
|
11
11
|
* @param {@link Amity.ReactableType} referenceType
|
|
12
12
|
* @param {string} referenceId
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
*
|
|
16
16
|
* @category Events
|
|
17
17
|
* */
|
|
18
|
-
export declare const onReactorAdded: (referenceType: Amity.ReactableType, referenceId: Amity.Reaction['referenceId'], callback: Amity.Listener<Amity.
|
|
18
|
+
export declare const onReactorAdded: (referenceType: Amity.ReactableType, referenceId: Amity.Reaction['referenceId'], callback: Amity.Listener<Amity.Reactor>) => Amity.Unsubscriber;
|
|
19
19
|
//# sourceMappingURL=onReactorAdded.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onReactorAdded.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/events/onReactorAdded.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;KAgBK;AACL,eAAO,MAAM,cAAc,kBACV,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,YAChC,MAAM,QAAQ,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"onReactorAdded.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/events/onReactorAdded.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;KAgBK;AACL,eAAO,MAAM,cAAc,kBACV,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,YAChC,MAAM,QAAQ,CAAC,MAAM,OAAO,CAAC,KACtC,MAAM,YA8DR,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* })
|
|
7
7
|
* ```
|
|
8
8
|
*
|
|
9
|
-
* Fired when an {@link Amity.
|
|
9
|
+
* Fired when an {@link Amity.Reactor} has been removed
|
|
10
10
|
*
|
|
11
11
|
* @param {@link Amity.ReactableType} referenceType
|
|
12
12
|
* @param {string} referenceId
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
*
|
|
16
16
|
* @category Events
|
|
17
17
|
* */
|
|
18
|
-
export declare const onReactorRemoved: (referenceType: Amity.ReactableType, referenceId: Amity.Reaction['referenceId'], callback: Amity.Listener<Amity.
|
|
18
|
+
export declare const onReactorRemoved: (referenceType: Amity.ReactableType, referenceId: Amity.Reaction['referenceId'], callback: Amity.Listener<Amity.Reactor>) => Amity.Unsubscriber;
|
|
19
19
|
//# sourceMappingURL=onReactorRemoved.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onReactorRemoved.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/events/onReactorRemoved.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;KAgBK;AACL,eAAO,MAAM,gBAAgB,kBACZ,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,YAChC,MAAM,QAAQ,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"onReactorRemoved.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/events/onReactorRemoved.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;KAgBK;AACL,eAAO,MAAM,gBAAgB,kBACZ,MAAM,aAAa,eACrB,MAAM,QAAQ,CAAC,aAAa,CAAC,YAChC,MAAM,QAAQ,CAAC,MAAM,OAAO,CAAC,KACtC,MAAM,YAkER,CAAC"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* }, response => merge(reactions, response.data))
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
|
-
* Observe all mutations on a list of {@link Amity.
|
|
12
|
+
* Observe all mutations on a list of {@link Amity.Reactor} for a given target object
|
|
13
13
|
*
|
|
14
14
|
* @param params for querying reactions
|
|
15
15
|
* @param callback the function to call when new data are available
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getReactions.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/observers/getReactions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getReactions.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/observers/getReactions.ts"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,YAAY,WACf,MAAM,sBAAsB,YAC1B,MAAM,sBAAsB,CAAC,MAAM,OAAO,CAAC,WAC5C,MAAM,oBAAoB,KAClC,MAAM,YAqGR,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** @hidden */
|
|
2
|
-
export declare const prepareMessagePayloadForCache: (payload: Amity.InternalMessage, reactors: Amity.
|
|
2
|
+
export declare const prepareMessagePayloadForCache: (payload: Amity.InternalMessage, reactors: Amity.Reactor[], event: Pick<Amity.Events, 'message.reactionAdded' | 'message.reactionRemoved'> | string) => void;
|
|
3
3
|
//# sourceMappingURL=prepareMessagePayloadForCache.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareMessagePayloadForCache.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/utils/prepareMessagePayloadForCache.ts"],"names":[],"mappings":"AAGA,cAAc;AAKd,eAAO,MAAM,6BAA6B,YAC/B,MAAM,eAAe,YACpB,MAAM,
|
|
1
|
+
{"version":3,"file":"prepareMessagePayloadForCache.d.ts","sourceRoot":"","sources":["../../../src/reactionRepository/utils/prepareMessagePayloadForCache.ts"],"names":[],"mappings":"AAGA,cAAc;AAKd,eAAO,MAAM,6BAA6B,YAC/B,MAAM,eAAe,YACpB,MAAM,OAAO,EAAE,SAClB,KAAK,MAAM,MAAM,EAAE,uBAAuB,GAAG,yBAAyB,CAAC,GAAG,MAAM,SAgCxF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onStreamStopped.d.ts","sourceRoot":"","sources":["../../../src/streamRepository/events/onStreamStopped.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,aAAc,MAAM,QAAQ,CAAC,MAAM,MAAM,CAAC,KAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"onStreamStopped.d.ts","sourceRoot":"","sources":["../../../src/streamRepository/events/onStreamStopped.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,aAAc,MAAM,QAAQ,CAAC,MAAM,MAAM,CAAC,KAAG,MAAM,YAS9E,CAAC"}
|
|
@@ -6,6 +6,5 @@ export declare const LinkedObject: {
|
|
|
6
6
|
story: (story: Amity.InternalStory) => Amity.Story;
|
|
7
7
|
storyTarget: (storyTarget: Amity.RawStoryTarget) => Amity.StoryTarget;
|
|
8
8
|
message: (message: Amity.InternalMessage<any>) => Amity.Message<any>;
|
|
9
|
-
reactor: (reactor: Amity.InternalReactor) => Amity.Reactor;
|
|
10
9
|
};
|
|
11
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY;;;;;;;;CAQxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reaction.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/reaction.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"reaction.d.ts","sourceRoot":"","sources":["../../../../src/utils/tests/dummy/reaction.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,OAK7B,CAAC;AACF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,QAI9B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,eAGnC,CAAC"}
|
package/package.json
CHANGED
|
@@ -26,9 +26,9 @@ declare global {
|
|
|
26
26
|
reconnect_error: Amity.ErrorResponse | undefined;
|
|
27
27
|
reconnect_failed: Amity.ErrorResponse | undefined;
|
|
28
28
|
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
'
|
|
29
|
+
'video-streaming.didRecord': Amity.StreamPayload;
|
|
30
|
+
'video-streaming.didStart': Amity.StreamPayload;
|
|
31
|
+
'video-streaming.didStop': Amity.StreamPayload;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
type MqttEvents = {
|
|
@@ -111,8 +111,8 @@ declare global {
|
|
|
111
111
|
'post.declined': Amity.PostPayload;
|
|
112
112
|
'post.flagged': Amity.PostPayload;
|
|
113
113
|
'post.unflagged': Amity.PostPayload;
|
|
114
|
-
'post.addReaction': Amity.PostPayload & { reactor: Amity.
|
|
115
|
-
'post.removeReaction': Amity.PostPayload & { reactor: Amity.
|
|
114
|
+
'post.addReaction': Amity.PostPayload & { reactor: Amity.Reactor };
|
|
115
|
+
'post.removeReaction': Amity.PostPayload & { reactor: Amity.Reactor };
|
|
116
116
|
};
|
|
117
117
|
|
|
118
118
|
type MqttCommentEvents = {
|
|
@@ -121,8 +121,8 @@ declare global {
|
|
|
121
121
|
'comment.deleted': Amity.CommentPayload;
|
|
122
122
|
'comment.flagged': Amity.CommentPayload;
|
|
123
123
|
'comment.unflagged': Amity.CommentPayload;
|
|
124
|
-
'comment.addReaction': Amity.CommentPayload & { reactor: Amity.
|
|
125
|
-
'comment.removeReaction': Amity.CommentPayload & { reactor: Amity.
|
|
124
|
+
'comment.addReaction': Amity.CommentPayload & { reactor: Amity.Reactor };
|
|
125
|
+
'comment.removeReaction': Amity.CommentPayload & { reactor: Amity.Reactor };
|
|
126
126
|
};
|
|
127
127
|
|
|
128
128
|
type MqttUserEvents = {
|
package/src/@types/core/model.ts
CHANGED
|
@@ -39,7 +39,7 @@ declare global {
|
|
|
39
39
|
commentChildren: Amity.InternalComment;
|
|
40
40
|
poll: Amity.Poll;
|
|
41
41
|
reaction: Amity.Reaction;
|
|
42
|
-
reactor: Amity.
|
|
42
|
+
reactor: Amity.Reactor;
|
|
43
43
|
|
|
44
44
|
stream: Amity.Stream;
|
|
45
45
|
|
|
@@ -91,7 +91,7 @@ declare global {
|
|
|
91
91
|
commentChildren: Pick<Amity.InternalComment, 'commentId'>;
|
|
92
92
|
poll: Pick<Amity.Poll, 'pollId'>;
|
|
93
93
|
reaction: Pick<Amity.Reaction, 'referenceType' | 'referenceId'>;
|
|
94
|
-
reactor: Pick<Amity.
|
|
94
|
+
reactor: Pick<Amity.Reactor, 'reactionId'>;
|
|
95
95
|
|
|
96
96
|
stream: Pick<Amity.Stream, 'streamId'>;
|
|
97
97
|
|
|
@@ -227,7 +227,7 @@ declare global {
|
|
|
227
227
|
messages: Amity.InternalMessage<T>[];
|
|
228
228
|
users: Amity.InternalUser[];
|
|
229
229
|
files: Amity.File[];
|
|
230
|
-
reactions: Amity.
|
|
230
|
+
reactions: Amity.Reactor[];
|
|
231
231
|
};
|
|
232
232
|
|
|
233
233
|
type MessagePayload<T extends Amity.MessageContentType = any> = Omit<
|
|
@@ -331,7 +331,7 @@ declare global {
|
|
|
331
331
|
|
|
332
332
|
// Payload with Reaction
|
|
333
333
|
type StoryReactionPayload = {
|
|
334
|
-
reactions: Amity.
|
|
334
|
+
reactions: Amity.Reactor[];
|
|
335
335
|
} & Amity.StoryPayload;
|
|
336
336
|
|
|
337
337
|
/**
|
|
@@ -6,18 +6,12 @@ declare global {
|
|
|
6
6
|
|
|
7
7
|
type ReactionActionType = 'onAdded' | 'onRemoved';
|
|
8
8
|
|
|
9
|
-
type
|
|
9
|
+
type Reactor = {
|
|
10
10
|
reactionId: string;
|
|
11
11
|
reactionName: string;
|
|
12
12
|
userId: Amity.InternalUser['userId'];
|
|
13
13
|
} & Amity.Timestamps;
|
|
14
14
|
|
|
15
|
-
type ReactorLinkedObject = {
|
|
16
|
-
user?: Amity.User;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
type Reactor = Amity.InternalReactor & Amity.ReactorLinkedObject;
|
|
20
|
-
|
|
21
15
|
type Reactable = {
|
|
22
16
|
reactionsCount: number;
|
|
23
17
|
reactions: Record<string, number>;
|
|
@@ -25,20 +19,20 @@ declare global {
|
|
|
25
19
|
};
|
|
26
20
|
|
|
27
21
|
type Reaction = {
|
|
28
|
-
reactors:
|
|
22
|
+
reactors: Reactor[];
|
|
29
23
|
} & Amity.Relationship<ReactableType>;
|
|
30
24
|
|
|
31
25
|
type QueryReactions = {
|
|
32
26
|
referenceId: Amity.Reaction['referenceId'];
|
|
33
27
|
referenceType: Amity.Reaction['referenceType'];
|
|
34
|
-
reactionName?: Amity.
|
|
28
|
+
reactionName?: Amity.Reactor['reactionName'];
|
|
35
29
|
page?: Amity.Page<string>;
|
|
36
30
|
};
|
|
37
31
|
|
|
38
32
|
type ReactionLiveCollection = Amity.LiveCollectionParams<Omit<QueryReactions, 'page'>>;
|
|
39
33
|
|
|
40
34
|
type ReactionLiveCollectionCache = Amity.LiveCollectionCache<
|
|
41
|
-
Amity.
|
|
35
|
+
Amity.Reactor['reactionId'],
|
|
42
36
|
Pick<QueryReactions, 'page'>
|
|
43
37
|
>;
|
|
44
38
|
}
|
package/src/client/api/login.ts
CHANGED
|
@@ -121,7 +121,9 @@ export const login = async (
|
|
|
121
121
|
// wire websocket events to our event emitter
|
|
122
122
|
proxyWebsocketEvents(client.ws, client.emitter);
|
|
123
123
|
|
|
124
|
-
client.ws.
|
|
124
|
+
client.ws.once('connect', () => {
|
|
125
|
+
client.ws.open();
|
|
126
|
+
});
|
|
125
127
|
|
|
126
128
|
client.userId = user.userId;
|
|
127
129
|
|
|
@@ -25,7 +25,7 @@ export const onCommentReactionAdded = (
|
|
|
25
25
|
): Amity.Unsubscriber => {
|
|
26
26
|
const client = getActiveClient();
|
|
27
27
|
|
|
28
|
-
const filter = (payload: Amity.CommentPayload & { reactor: Amity.
|
|
28
|
+
const filter = (payload: Amity.CommentPayload & { reactor: Amity.Reactor }) => {
|
|
29
29
|
if (!client.cache) {
|
|
30
30
|
callback(LinkedObject.comment(payload.comments[0]));
|
|
31
31
|
} else {
|
|
@@ -25,7 +25,7 @@ export const onCommentReactionRemoved = (
|
|
|
25
25
|
): Amity.Unsubscriber => {
|
|
26
26
|
const client = getActiveClient();
|
|
27
27
|
|
|
28
|
-
const filter = (payload: Amity.CommentPayload & { reactor: Amity.
|
|
28
|
+
const filter = (payload: Amity.CommentPayload & { reactor: Amity.Reactor }) => {
|
|
29
29
|
if (!client.cache) {
|
|
30
30
|
callback(LinkedObject.comment(payload.comments[0]));
|
|
31
31
|
} else {
|
|
@@ -73,6 +73,8 @@ export const getComments = (
|
|
|
73
73
|
const { policy = COLLECTION_DEFAULT_CACHING_POLICY } = config ?? {};
|
|
74
74
|
|
|
75
75
|
const disposers: Amity.Unsubscriber[] = [];
|
|
76
|
+
|
|
77
|
+
const sortBy = params.sortBy ? params.sortBy : 'lastCreated';
|
|
76
78
|
const cacheKey = [
|
|
77
79
|
'comment',
|
|
78
80
|
'collection',
|
|
@@ -80,6 +82,7 @@ export const getComments = (
|
|
|
80
82
|
referenceId: params.referenceType,
|
|
81
83
|
referenceType: params.referenceId,
|
|
82
84
|
parentId: params?.parentId || '',
|
|
85
|
+
sortBy,
|
|
83
86
|
},
|
|
84
87
|
];
|
|
85
88
|
|
|
@@ -95,8 +98,6 @@ export const getComments = (
|
|
|
95
98
|
comments = filterByPropEquality(comments, 'isDeleted', false);
|
|
96
99
|
}
|
|
97
100
|
|
|
98
|
-
const sortBy = params.sortBy ? params.sortBy : 'lastCreated';
|
|
99
|
-
|
|
100
101
|
comments = comments.sort(sortBy === 'lastCreated' ? sortByLastCreated : sortByFirstCreated);
|
|
101
102
|
|
|
102
103
|
callback({
|
|
@@ -146,9 +147,7 @@ export const getComments = (
|
|
|
146
147
|
runQuery(
|
|
147
148
|
query,
|
|
148
149
|
({ data: result, error, loading, paging }) => {
|
|
149
|
-
|
|
150
|
-
const sorting = queryParams.sortBy || 'lastCreated';
|
|
151
|
-
const page = sorting === 'lastCreated' ? paging?.next : paging?.previous;
|
|
150
|
+
const page = paging?.next;
|
|
152
151
|
|
|
153
152
|
const data = {
|
|
154
153
|
loading,
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
} from '~/utils/tests';
|
|
13
13
|
import { getFutureDate } from '~/core/model';
|
|
14
14
|
|
|
15
|
-
import { LinkedObject } from '~/utils/linkedObject';
|
|
16
15
|
import { getComment } from '../getComment';
|
|
16
|
+
import { LinkedObject } from '~/utils/linkedObject';
|
|
17
17
|
|
|
18
18
|
describe('getComment', () => {
|
|
19
19
|
const response = {
|
|
@@ -81,7 +81,7 @@ describe('getComment', () => {
|
|
|
81
81
|
data: { text: 'new-text' },
|
|
82
82
|
});
|
|
83
83
|
|
|
84
|
-
const reactor: Amity.
|
|
84
|
+
const reactor: Amity.Reactor = {
|
|
85
85
|
createdAt: getFutureDate(update.updatedAt),
|
|
86
86
|
reactionId: 'like',
|
|
87
87
|
reactionName: 'like',
|
package/src/core/events.ts
CHANGED
|
@@ -15,10 +15,6 @@ const WS_EVENTS = [
|
|
|
15
15
|
'sessionStateChange',
|
|
16
16
|
// for internal use by accessTokenExpiryWatcher
|
|
17
17
|
'tokenExpired',
|
|
18
|
-
|
|
19
|
-
'v3.video-streaming.didRecord',
|
|
20
|
-
'v3.video-streaming.didStart',
|
|
21
|
-
'v3.video-streaming.didStop',
|
|
22
18
|
] as const;
|
|
23
19
|
|
|
24
20
|
const MQTT_EVENTS = [
|
|
@@ -4,15 +4,15 @@ import { getMessageMarkers } from '~/marker/api/getMessageMarkers';
|
|
|
4
4
|
import { prepareMessagePayloadForCache } from '~/reactionRepository/utils/prepareMessagePayloadForCache';
|
|
5
5
|
import { inferIsDeleted } from '~/utils/inferIsDeleted';
|
|
6
6
|
|
|
7
|
+
import { getMessageReadCount } from './getMessageReadCount';
|
|
7
8
|
import { MessageContentType } from '~/@types';
|
|
8
9
|
import { convertFromRaw as convertSubChannelFromRaw } from '~/subChannelRepository/utils/convertSubChannelFromRaw';
|
|
9
10
|
import { updateSubChannelCache } from '~/subChannelRepository/utils/updateSubChannelCache';
|
|
10
11
|
import { COLLECTION_DEFAULT_PAGINATION_LIMIT } from '~/utils/constants';
|
|
11
|
-
import { getMessageReadCount } from './getMessageReadCount';
|
|
12
12
|
|
|
13
13
|
export function convertFromRaw(
|
|
14
14
|
message: Amity.RawMessage,
|
|
15
|
-
reactors?: Amity.
|
|
15
|
+
reactors?: Amity.Reactor[],
|
|
16
16
|
event?: keyof Amity.MqttMessageEvents,
|
|
17
17
|
): Amity.InternalMessage {
|
|
18
18
|
const {
|
|
@@ -76,7 +76,7 @@ describe('getPost', () => {
|
|
|
76
76
|
data: { text: 'new-text' },
|
|
77
77
|
updatedAt: getFutureDate(post.updatedAt),
|
|
78
78
|
};
|
|
79
|
-
const reactor: Amity.
|
|
79
|
+
const reactor: Amity.Reactor = {
|
|
80
80
|
createdAt: getFutureDate(post.updatedAt),
|
|
81
81
|
reactionId: 'like',
|
|
82
82
|
reactionName: 'like',
|
|
@@ -214,7 +214,7 @@ describe('getPosts', () => {
|
|
|
214
214
|
const reactionEvents: [
|
|
215
215
|
string,
|
|
216
216
|
keyof Amity.Events,
|
|
217
|
-
Amity.PostPayload & { reactor: Amity.
|
|
217
|
+
Amity.PostPayload & { reactor: Amity.Reactor },
|
|
218
218
|
][] = [
|
|
219
219
|
[
|
|
220
220
|
'it should update post in collection onReactionAdded',
|
|
@@ -27,7 +27,7 @@ import { dispatchReactable } from '../utils';
|
|
|
27
27
|
export const addReaction = async (
|
|
28
28
|
referenceType: Amity.Reaction['referenceType'],
|
|
29
29
|
referenceId: Amity.Reaction['referenceId'],
|
|
30
|
-
reactionName: Amity.
|
|
30
|
+
reactionName: Amity.Reactor['reactionName'],
|
|
31
31
|
): Promise<boolean> => {
|
|
32
32
|
const client = getActiveClient();
|
|
33
33
|
client.log('reaction/createReaction', {
|
|
@@ -76,7 +76,7 @@ export const addReaction = async (
|
|
|
76
76
|
addReaction.optimistically = (
|
|
77
77
|
referenceType: Amity.ReactableType,
|
|
78
78
|
referenceId: Amity.Reaction['referenceId'],
|
|
79
|
-
reactionName: Amity.
|
|
79
|
+
reactionName: Amity.Reactor['reactionName'],
|
|
80
80
|
): boolean | undefined => {
|
|
81
81
|
const client = getActiveClient();
|
|
82
82
|
client.log('reaction/createReaction.optimistically', {
|
|
@@ -11,17 +11,17 @@ import { queryReactions } from './queryReactions';
|
|
|
11
11
|
* })
|
|
12
12
|
* ```
|
|
13
13
|
*
|
|
14
|
-
* Queries a paginable list of {@link Amity.
|
|
14
|
+
* Queries a paginable list of {@link Amity.Reactor} objects
|
|
15
15
|
*
|
|
16
16
|
* @param query The query parameters
|
|
17
|
-
* @returns A page of {@link Amity.
|
|
17
|
+
* @returns A page of {@link Amity.Reactor} objects
|
|
18
18
|
*
|
|
19
19
|
* @reaction Reaction API
|
|
20
20
|
* @async
|
|
21
21
|
* */
|
|
22
22
|
export const queryReactor = async (
|
|
23
23
|
query: Amity.QueryReactions,
|
|
24
|
-
): Promise<Amity.Paged<Amity.
|
|
24
|
+
): Promise<Amity.Paged<Amity.Reactor, Amity.Page<string>>> => {
|
|
25
25
|
const client = getActiveClient();
|
|
26
26
|
client.log('reaction/queryReactor', query);
|
|
27
27
|
|
|
@@ -28,7 +28,7 @@ import { dispatchReactable } from '../utils';
|
|
|
28
28
|
export const removeReaction = async (
|
|
29
29
|
referenceType: Amity.Reaction['referenceType'],
|
|
30
30
|
referenceId: Amity.Reaction['referenceId'],
|
|
31
|
-
reactionName: Amity.
|
|
31
|
+
reactionName: Amity.Reactor['reactionName'],
|
|
32
32
|
): Promise<boolean> => {
|
|
33
33
|
const client = getActiveClient();
|
|
34
34
|
client.log('reaction/removeReaction', {
|
|
@@ -79,7 +79,7 @@ export const removeReaction = async (
|
|
|
79
79
|
removeReaction.optimistically = (
|
|
80
80
|
referenceType: Amity.ReactableType,
|
|
81
81
|
referenceId: Amity.Reaction['referenceId'],
|
|
82
|
-
reactionName: Amity.
|
|
82
|
+
reactionName: Amity.Reactor['reactionName'],
|
|
83
83
|
): boolean | undefined => {
|
|
84
84
|
const client = getActiveClient();
|
|
85
85
|
client.log('reaction/removeReaction.optimistically', {
|
|
@@ -11,7 +11,7 @@ import { prepareMessagePayload } from '~/messageRepository/utils';
|
|
|
11
11
|
* })
|
|
12
12
|
* ```
|
|
13
13
|
*
|
|
14
|
-
* Fired when an {@link Amity.
|
|
14
|
+
* Fired when an {@link Amity.Reactor} has been added
|
|
15
15
|
*
|
|
16
16
|
* @param {@link Amity.ReactableType} referenceType
|
|
17
17
|
* @param {string} referenceId
|
|
@@ -23,14 +23,14 @@ import { prepareMessagePayload } from '~/messageRepository/utils';
|
|
|
23
23
|
export const onReactorAdded = (
|
|
24
24
|
referenceType: Amity.ReactableType,
|
|
25
25
|
referenceId: Amity.Reaction['referenceId'],
|
|
26
|
-
callback: Amity.Listener<Amity.
|
|
26
|
+
callback: Amity.Listener<Amity.Reactor>,
|
|
27
27
|
): Amity.Unsubscriber => {
|
|
28
28
|
const client = getActiveClient();
|
|
29
29
|
|
|
30
30
|
const callbackWrapper = (
|
|
31
31
|
referenceType_: Amity.ReactableType,
|
|
32
32
|
referenceId_: Amity.Reaction['referenceId'],
|
|
33
|
-
reaction: Amity.
|
|
33
|
+
reaction: Amity.Reactor,
|
|
34
34
|
) => {
|
|
35
35
|
if (referenceType_ === referenceType && referenceId_ === referenceId) {
|
|
36
36
|
callback(reaction);
|
|
@@ -51,7 +51,7 @@ export const onReactorAdded = (
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
if (referenceType === 'post') {
|
|
54
|
-
const filter = (payload: Amity.PostPayload & { reactor: Amity.
|
|
54
|
+
const filter = (payload: Amity.PostPayload & { reactor: Amity.Reactor }) => {
|
|
55
55
|
const { reactor, ...rest } = payload;
|
|
56
56
|
|
|
57
57
|
ingestInCache(rest as Amity.ProcessedPostPayload);
|
|
@@ -76,7 +76,7 @@ export const onReactorAdded = (
|
|
|
76
76
|
return createEventSubscriber(client, 'story.reactionAdded', 'story.reactionAdded', filter);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
const filter = (payload: Amity.CommentPayload & { reactor: Amity.
|
|
79
|
+
const filter = (payload: Amity.CommentPayload & { reactor: Amity.Reactor }) => {
|
|
80
80
|
const { reactor, ...rest } = payload;
|
|
81
81
|
|
|
82
82
|
ingestInCache(rest as Amity.CommentPayload);
|
|
@@ -11,7 +11,7 @@ import { prepareMessagePayload } from '~/messageRepository/utils';
|
|
|
11
11
|
* })
|
|
12
12
|
* ```
|
|
13
13
|
*
|
|
14
|
-
* Fired when an {@link Amity.
|
|
14
|
+
* Fired when an {@link Amity.Reactor} has been removed
|
|
15
15
|
*
|
|
16
16
|
* @param {@link Amity.ReactableType} referenceType
|
|
17
17
|
* @param {string} referenceId
|
|
@@ -23,14 +23,14 @@ import { prepareMessagePayload } from '~/messageRepository/utils';
|
|
|
23
23
|
export const onReactorRemoved = (
|
|
24
24
|
referenceType: Amity.ReactableType,
|
|
25
25
|
referenceId: Amity.Reaction['referenceId'],
|
|
26
|
-
callback: Amity.Listener<Amity.
|
|
26
|
+
callback: Amity.Listener<Amity.Reactor>,
|
|
27
27
|
): Amity.Unsubscriber => {
|
|
28
28
|
const client = getActiveClient();
|
|
29
29
|
|
|
30
30
|
const callbackWrapper = (
|
|
31
31
|
referenceType_: Amity.ReactableType,
|
|
32
32
|
referenceId_: Amity.Reaction['referenceId'],
|
|
33
|
-
reaction: Amity.
|
|
33
|
+
reaction: Amity.Reactor,
|
|
34
34
|
) => {
|
|
35
35
|
if (referenceType_ === referenceType && referenceId_ === referenceId) {
|
|
36
36
|
callback(reaction);
|
|
@@ -51,7 +51,7 @@ export const onReactorRemoved = (
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
if (referenceType === 'post') {
|
|
54
|
-
const filter = (payload: Amity.PostPayload & { reactor: Amity.
|
|
54
|
+
const filter = (payload: Amity.PostPayload & { reactor: Amity.Reactor }) => {
|
|
55
55
|
const { reactor, ...rest } = payload;
|
|
56
56
|
|
|
57
57
|
ingestInCache(rest as Amity.ProcessedPostPayload);
|
|
@@ -78,7 +78,7 @@ export const onReactorRemoved = (
|
|
|
78
78
|
return createEventSubscriber(client, 'story.reactionRemoved', 'story.reactionRemoved', filter);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
const filter = (payload: Amity.CommentPayload & { reactor: Amity.
|
|
81
|
+
const filter = (payload: Amity.CommentPayload & { reactor: Amity.Reactor }) => {
|
|
82
82
|
const { reactor, ...rest } = payload;
|
|
83
83
|
|
|
84
84
|
ingestInCache(rest as Amity.CommentPayload);
|