Skip to content

Feature Request: Ability to change channels type #1441

@Annastrin

Description

@Annastrin

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"
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions