Unable to update metadata of a conversation channel

So I created a conversation type channel with another user, and now I am able to update the metadata if I logged in using my account, the account I used to create the channel. However, if I am logged in as the other user of the channel, and try to update the metadata I get the below error.

{"code": 400301, "data": {}, "message": "You are not allowed to do this", "status": "error"}

Any idea how to fix this ?

I am using @amityco/ts-sdk for react-native app.

Hello @maknom66 this is an expected behaviour, in order to manage/add members to a channel, you will have to be at least that channel moderator. In you case, you created that channel, so you’re automatically the moderator. You can promote user role using this api Amity API

Here is an additional docs, to see the permission for each role: https://docs.amity.co/core-concepts/user/user-permission#channel

Suppose I create a community channel, and someone joins this channel and sends some messages in the channel. In my channel list screen, I want the last message to be visible along with the unread message count, how should I achieve this? previously I thought to achieve this via updating the channel metadata but since this member joined by themself I didn’t get the chance to update their role as a moderator.

Hi @maknom66 You can achieve that by getting new message event from webhook and store them in your database. Then you can call update metadata by using adminToken from your backend system. FYI, We will be supporting this in the sdk later this year :blush::pray: