# Metadata dissapear in channel

**URL:** <https://forum.social.plus/t/metadata-dissapear-in-channel/1035>\
**Category:** JS SDK\
**Created:** [January 4, 2024, 11:51am UTC](https://forum.social.plus/t/metadata-dissapear-in-channel/1035 "2024-01-04T11:51:23Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mykola](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@Mykola](https://forum.social.plus/u/Mykola)\
**Post date:** [January 4, 2024, 11:51am UTC](https://forum.social.plus/t/metadata-dissapear-in-channel/1035/1 "2024-01-04T11:51:23Z")

</div>

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'
  }
});

```

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [January 4, 2024, 11:57am UTC](https://forum.social.plus/t/metadata-dissapear-in-channel/1035/2 "2024-01-04T11:57:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mykola](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@Mykola](https://forum.social.plus/u/Mykola)\
**Post date:** [January 4, 2024, 12:24pm UTC](https://forum.social.plus/t/metadata-dissapear-in-channel/1035/3 "2024-01-04T12:24:09Z")

</div>

I didn’t change metadata when update channel

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

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [January 4, 2024, 12:25pm UTC](https://forum.social.plus/t/metadata-dissapear-in-channel/1035/4 "2024-01-04T12:25:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mykola](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@Mykola](https://forum.social.plus/u/Mykola)\
**Post date:** [January 4, 2024, 12:42pm UTC](https://forum.social.plus/t/metadata-dissapear-in-channel/1035/5 "2024-01-04T12:42:42Z")

</div>

Yes, Sure  
I’ve used v5.35.3.

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [January 4, 2024, 12:44pm UTC](https://forum.social.plus/t/metadata-dissapear-in-channel/1035/6 "2024-01-04T12:44:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mykola](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@Mykola](https://forum.social.plus/u/Mykola)\
**Post date:** [January 4, 2024, 12:48pm UTC](https://forum.social.plus/t/metadata-dissapear-in-channel/1035/7 "2024-01-04T12:48:02Z")

</div>

Thank you!!! 👌

* * *

---

<div class="post-metadata">

**Author:** ![topAmity](https://avatars.discourse-cdn.com/v4/letter/t/a88e4f/32.png) [@topAmity](https://forum.social.plus/u/topAmity)\
**Post date:** [January 8, 2024, 7:04am UTC](https://forum.social.plus/t/metadata-dissapear-in-channel/1035/8 "2024-01-08T07:04:14Z")

</div>

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

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

});

```

---

<div class="post-metadata">

**Author:** ![Mykola](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@Mykola](https://forum.social.plus/u/Mykola)\
**Post date:** [January 8, 2024, 10:05am UTC](https://forum.social.plus/t/metadata-dissapear-in-channel/1035/9 "2024-01-08T10:05:58Z")

</div>

> [@topAmity](#):
>
> 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

Thanks! I’ll try to add this fix

---

<div class="post-metadata">

**Author:** ![Mykola](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@Mykola](https://forum.social.plus/u/Mykola)\
**Post date:** [January 9, 2024, 9:45am UTC](https://forum.social.plus/t/metadata-dissapear-in-channel/1035/10 "2024-01-09T09:45:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SocialPlus\_Support](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.social.plus/socialplus_support/32/798_2.png) [@SocialPlus\_Support](https://forum.social.plus/u/SocialPlus_Support)\
**Post date:** [January 9, 2024, 10:57am UTC](https://forum.social.plus/t/metadata-dissapear-in-channel/1035/11 "2024-01-09T10:57:40Z")

</div>

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
