Metadata dissapear in channel

Hello! I created community channel with metadata sucessfully, but when I fetch channels list sometimes metadata with internalId disappear
I’ve tried to use ChannelRepository.queryChannels and also Amity Api and sometimes didn’t get metadata

const liveChannel = ChannelRepository.createChannel({
  type: ChannelType.Community,
  displayName: 'Some groupname',
  userIds: ['SomeUserId'],
  avatarFileId: 'Some avatar Id',
  metadata: {
    internalId: 'SomeId'
  }
});

Hello, did you perhaps make an update to the channel without including metadata? This could lead to the unintentional removal of metadata.

I didn’t change metadata when update channel

await ChannelRepository.updateChannel({
channelId: this.channelId,
displayName: details.name,
avatarFileId: details?.avatarFileId
});

1 Like

Noted on this. May I know your current sdk version, please?

Yes, Sure
I’ve used v5.35.3.

1 Like

Thank you, we will pass this to the team to further check and get back to you.

Thank you!!! :ok_hand:


Hi Mykola, metadata field is still required even though you update the channel otherwise it’ll be replaced with empty field. Therefore, Your code should look like this

await ChannelRepository.updateChannel({
channelId: this.channelId,
displayName: details.name,
avatarFileId: details?.avatarFileId,
 metadata: {
    internalId: 'SomeId'
  }

});

Thanks! I’ll try to add this fix

Hello! I’ve tried to add this fix for update channel, but even when I don’t update the channel the metadata disappears. It seems that metadata disappears sometimes not saved when create group channel

Hello,

Could you please provide more details regarding the disappearance of metadata? Specifically, let us know what actions you were taking when you observed the issue. If possible, a screen recording demonstrating the problem would greatly assist our team in identifying and addressing the issue more efficiently.

Best regards,
Support team