Closed jirom closed 1 month ago
Hi,
Indeed, our typings don't contain created_by_id.
This is because the ChannelData
is different if you connect client-side or server-side. However, the code in our documentation is correct, this is how you can provide the creator:
const channel = client.channel("messaging", channelId, { name: chatname, created_by_id: "<user id>" })
await channel.create()
Moving forward, we will have a separate Node SDK with proper server-side types, but until then, these typing inconsistencies can occur.
I'm going to close this ticket, but feel free to reopen it in case the solution doesn't work for you.
I'm trying to create a channel on the server side but it's failing with the following error.
This is how I'm creating the channel.
According to the docs here I'm supposed to pass the creator as part of the custom object but the
ChannelData
type does not have acreated_by_id
field.I'm currently depending on
stream-chat: 8.40.9