Skip to content

Include OWN_CAPABILITIES data in websocket message for users in call.member_added #1890

@TimNZ

Description

@TimNZ

Which package/packages do you use?

  • @stream-io/video-react-sdk
  • @stream-io/video-react-native-sdk
  • @stream-io/video-client

Is your feature request related to a problem? Please describe.
Hosts dynaically add and remove call members and using a waiting room system.
When I add a call member the newly added call user receives the 'call.member_added' event message via the websocket.
But I also have to execute call.get() to refresh OWN_CAPABILITIES of the user to test that the user can now join a call to refresh the UI 'Join/Leave' button.
I utilise 'useHasPermissions' hook and this is stale until I execute call.get(), which I am now doing on 'call.member_*' events if event.members has client user reference.

Describe the solution you'd like
When sending call.member_added WS message include OWN_CAPABILITIES if the user is the client user, and
refresh the internal state of the call.
Maybe this triggers a useHasPermissions re-render, or you implement a new useOwnCapabilities() hook that triggers on change.

Describe alternatives you've considered

Additional context

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions