mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 12:08:01 +00:00
fix: Read message appears on page refresh in the widget (#3175)
This commit is contained in:
@@ -36,6 +36,7 @@ export default {
|
||||
widgetPosition: 'right',
|
||||
showPopoutButton: false,
|
||||
isWebWidgetTriggered: false,
|
||||
isWidgetOpen: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -134,8 +135,8 @@ export default {
|
||||
this.hideMessageBubble = !!hideBubble;
|
||||
},
|
||||
registerUnreadEvents() {
|
||||
bus.$on('on-agent-message-recieved', () => {
|
||||
if (!this.isIFrame) {
|
||||
bus.$on('on-agent-message-received', () => {
|
||||
if (!this.isIFrame || this.isWidgetOpen) {
|
||||
this.setUserLastSeen();
|
||||
}
|
||||
this.setUnreadView();
|
||||
@@ -257,6 +258,7 @@ export default {
|
||||
this.showUnreadView = false;
|
||||
this.showCampaignView = false;
|
||||
} else if (message.event === 'toggle-open') {
|
||||
this.isWidgetOpen = message.isOpen;
|
||||
this.toggleOpen();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user