chore: add post message event for sending cookie to rn widget (#1860)
This commit is contained in:
parent
9e8a943ec7
commit
d8cb03525f
1 changed files with 10 additions and 0 deletions
|
@ -59,6 +59,16 @@ export default {
|
|||
this.fetchAvailableAgents(websiteToken);
|
||||
this.setLocale(getLocale(window.location.search));
|
||||
}
|
||||
// Pass cookie to react native widget
|
||||
if (window.ReactNativeWebView) {
|
||||
this.registerListeners();
|
||||
window.ReactNativeWebView.postMessage(
|
||||
JSON.stringify({
|
||||
type: 'auth-token',
|
||||
value: window.authToken,
|
||||
})
|
||||
);
|
||||
}
|
||||
this.$store.dispatch('conversationAttributes/get');
|
||||
this.setWidgetColor(window.chatwootWebChannel);
|
||||
this.registerUnreadEvents();
|
||||
|
|
Loading…
Reference in a new issue