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

Add alias 'topics' for 'contexts' #864

Merged
merged 3 commits into from
Aug 28, 2023
Merged

Add alias 'topics' for 'contexts' #864

merged 3 commits into from
Aug 28, 2023

Conversation

iAmmar7
Copy link
Collaborator

@iAmmar7 iAmmar7 commented Aug 28, 2023

Description

Allow users to pass topics as an alias of contexts.

ref: https://github.com/signalwire/cloud-product/issues/7764

Type of change

  • Internal refactoring
  • Bug fix (bugfix - non-breaking)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Code snippets

const client = new Voice.Client({
      host: process.env.RELAY_HOST || 'relay.swire.io',
      project: process.env.RELAY_PROJECT as string,
      token: process.env.RELAY_TOKEN as string,
      topics: [process.env.VOICE_CONTEXT as string],
      // contexts: [process.env.VOICE_CONTEXT as string],
})

When both topics and contexts are passed, topics will have more priority.

@changeset-bot
Copy link

changeset-bot bot commented Aug 28, 2023

🦋 Changeset detected

Latest commit: 6587a8f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@signalwire/realtime-api Minor
@signalwire/core Minor
@signalwire/js Patch
@signalwire/web-api Patch
@signalwire/webrtc Patch

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

@iAmmar7 iAmmar7 requested a review from edolix August 28, 2023 15:46
Copy link
Contributor

@edolix edolix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@edolix edolix merged commit be17e61 into main Aug 28, 2023
@edolix edolix deleted the aa/context-alias branch August 28, 2023 16:50
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