Closed richtrwhereby closed 2 months ago
Latest commit: 7d62845494677951f78e3ee57f2c61b7144e87f4
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Description
In browser-sdk version 3 we made a change that requires users to explicitly call
actions.joinRoom()
to connect to a room (https://github.com/whereby/sdk/pull/254).With this change it is possible that users may try to invoke other actions when they have not yet joined and been connected to a room.
This PR adds an additional wrapper around
actions
APIs that check the user is connected to room so that actions can be successfully performed.If the browser-sdk is not currently connected to a room then a warning will be displayed in the developer console and the action will not be triggered.
Testing
yarn build && yarn dev
tmp-out-of-order-check.diff
and, in the SDK folder, apply that to the project withgit apply tmp-out-of-order-check.diff
."Action cannot be performed outside of a connected room"
) and no additional errors should be displayed in the console.Checklist