Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chat-core-zendesk: reset event listeners on re-initialization #58

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

yen-tt
Copy link
Collaborator

@yen-tt yen-tt commented Dec 6, 2024

Previously, once a messaging convo/ticket is closed, we reset the session and unbind all event listeners from zendesk to SDK. On re-initialization for another request to speak to agent, we failed to setup the event listeners again. So any messages sent from agent on the second ticket does NOT go through the SDK and display to user.

This CR ensures that event listeners are cleared and setup on each init call, and the message events should apply for the latest relevant conversation only.

J=CLIP-1664
TEST=manual

started a messaging convo with agent, closed the ticket. Request agent again, messaged as user and agent, see that all messages are displayed as expected on both Zendesk and Chat SDK.

@yen-tt yen-tt requested a review from a team as a code owner December 6, 2024 21:31
@yen-tt yen-tt merged commit d486394 into main Dec 9, 2024
8 checks passed
@yen-tt yen-tt deleted the dev/zendesk-reinit-events branch December 9, 2024 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants