Skip to content

Commit 1058405

Browse files
fix: ensure pin permission changes reflect without requiring user logout (#688)
1 parent f64a3a6 commit 1058405

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/react/src/views/EmbeddedChat.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ const EmbeddedChat = (props) => {
8383
}));
8484

8585
const setIsLoginIn = useLoginStore((state) => state.setIsLoginIn);
86+
const setUserPinPermissions = useUserStore(
87+
(state) => state.setUserPinPermissions
88+
);
8689

8790
if (isClosable && !setClosableState) {
8891
throw Error(
@@ -125,6 +128,8 @@ const EmbeddedChat = (props) => {
125128
setIsLoginIn(true);
126129
try {
127130
await RCInstance.autoLogin(auth);
131+
const permissions = await RCInstance.permissionInfo();
132+
setUserPinPermissions(permissions.update[150]);
128133
} catch (error) {
129134
console.error(error);
130135
} finally {

0 commit comments

Comments
 (0)