agora-appbuilder-core 4.0.31-beta-3 → 4.0.31-beta-4
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/package.json
CHANGED
|
@@ -89,12 +89,17 @@ const ChatConfigure = ({children}) => {
|
|
|
89
89
|
addReactionToPrivateStore,
|
|
90
90
|
addReactionToStore,
|
|
91
91
|
} = useChatMessages();
|
|
92
|
-
const {setPinMsgId, setPinnedByUser} = useChatUIControls();
|
|
92
|
+
const {setPinMsgId, setPinnedByUser, privateChatUser} = useChatUIControls();
|
|
93
|
+
const privateChatUserRef = React.useRef(privateChatUser);
|
|
93
94
|
|
|
94
95
|
React.useEffect(() => {
|
|
95
96
|
defaultContentRef.current = defaultContent;
|
|
96
97
|
}, [defaultContent]);
|
|
97
98
|
|
|
99
|
+
React.useEffect(() => {
|
|
100
|
+
privateChatUserRef.current = privateChatUser;
|
|
101
|
+
}, [privateChatUser]);
|
|
102
|
+
|
|
98
103
|
useEffect(() => {
|
|
99
104
|
const logout = async () => {
|
|
100
105
|
try {
|
|
@@ -296,9 +301,11 @@ const ChatConfigure = ({children}) => {
|
|
|
296
301
|
if (convId === data.chat.group_id) {
|
|
297
302
|
addReactionToStore(msgId, reactions as unknown as Reaction[]);
|
|
298
303
|
} else {
|
|
299
|
-
const
|
|
304
|
+
const fromUserID = operations[0].userId;
|
|
305
|
+
const uid =
|
|
306
|
+
localUid === fromUserID ? privateChatUserRef.current : fromUserID;
|
|
300
307
|
addReactionToPrivateStore(
|
|
301
|
-
|
|
308
|
+
uid,
|
|
302
309
|
msgId,
|
|
303
310
|
reactions as unknown as Reaction[],
|
|
304
311
|
);
|