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

Feature Request: Ability to change channels type #1441

Open
Annastrin opened this issue Jan 21, 2025 · 0 comments
Open

Feature Request: Ability to change channels type #1441

Annastrin opened this issue Jan 21, 2025 · 0 comments

Comments

@Annastrin
Copy link

We would like to have a functionality to change channels type. Currently we have 'messaging' (or private) and 'public'. Some 'messaging' private channels are group channels and would like to allow users to make them 'public' (and also allow to change back 'public' to 'messaging').

I tried to change the type with updatePartial, but it throws an error.

const serverClient = StreamChat.getInstance(this.apiKey, this.apiSecret);

const channel = await serverClient.queryChannels({
  cid: { $eq: channelID },
});

const result = await channel[0].updatePartial({
  set: { type: "messaging", isGroup: true },
});

Error message:

"data": {
  "StatusCode": 403,
  "code": 17,
  "details": [],
  "duration": "0.00ms",
  "message": "UpdateChannelPartial failed with error: \"field `type` is reserved and cannot updated\"",
  "more_info": "https://getstream.io/chat/docs/api_errors_response"
},
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

No branches or pull requests

1 participant