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

Fix event handlers in broadcast message #245

Merged
merged 6 commits into from
Nov 21, 2024
Merged

Conversation

esme
Copy link
Contributor

@esme esme commented Nov 20, 2024

Description

https://git.hubteam.com/HubSpot/calling-extensions-fe/issues/913

When receiving a broadcast message in the calling window, we need to invoke the event handler in _cti rather than cti to send an SDK message to HubSpot.

This is because the event handler, i.e. cti.initialized(), could technically send a broadcast message to the other tabs if iframeLocation has been set and we don't want to send another broadcast message when receiving one.

Merge Checklist

Q A
Adds Documentation?
Any Dependency Changes?
Patch: Bug Fix? x
Minor: New Feature?
Major: Breaking Change?

BRAVE Checklist

  • I have read the BRAVE checklist and confirmed if the following is necessary.
Q A
Backwards Compatible?
Rollout/Rollback Plan?
Automated test coverage?
Verified that changes work?
Expect Dependencies to Fail?

Copy link

github-actions bot commented Nov 20, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://HubSpot.github.io/calling-extensions-sdk/pr-preview/pr-245/
on branch gh-pages at 2024-11-21 19:37 UTC

@esme esme marked this pull request as ready for review November 20, 2024 19:31
@esme esme requested a review from a team as a code owner November 20, 2024 19:31
demos/demo-react-ts/src/hooks/useCti.ts Outdated Show resolved Hide resolved
demos/demo-react-ts/src/components/App.tsx Outdated Show resolved Hide resolved
@esme esme merged commit 05bfdaa into master Nov 21, 2024
1 check passed
@esme esme deleted the sync-remote-with-window-fix branch November 21, 2024 19:40
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.

2 participants