# Sorted\_metaarray를 포함하는 메세지의 response 이상

**URL:** <https://community.sendbird.com/t/sorted-metaarray-response/4502>\
**Category:** Sendbird Chat API/SDK\
**Tags:** group-channel, message, chatsdk\
**Created:** [April 21, 2022, 5:40am UTC](https://community.sendbird.com/t/sorted-metaarray-response/4502 "2022-04-21T05:40:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hkkim](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/hkkim/32/2369_2.png) [@hkkim](https://community.sendbird.com/u/hkkim)\
**Post date:** [April 21, 2022, 5:40am UTC](https://community.sendbird.com/t/sorted-metaarray-response/4502/1 "2022-04-21T05:40:34Z")

</div>

안녕하세요. sendbird uikit 를 커스텀해 앱을 만들고 있습니다.

sorted\_metaarray를 포함하는 메세지를 보낼 때 이상한 점이 있어 문의합니다.

ex)

포스트맨을 이용해 아래와 같이 메세지를 보내면

```auto
{
    "user_id": "admin",
    "message_type": "MESG",
    "message": "\n test page",
    "sorted_metaarray": [
        {
            "key": "agent(PQ_A)",
            "value": [
                {
                    "type": "BK",
                    "extra": "{\"menuKey\":\"20220302174707288\",\"menuId\":\"20220302174707288\",\"menuCommand\":\"agent\",\"sceId\":\"20220302174707287\"}"
                }
            ]
        }
    ]
}

```

다음과 같은 Response를 받습니다.

```auto
{
    "message_survival_seconds": -1,
    "custom_type": "",
    "mentioned_users": [],
    "translations": {},
    "updated_at": 0,
    "is_op_msg": true,
    "is_removed": false,
    "user": {
        "require_auth_for_profile_image": false,
        "is_active": true,
        "role": "operator",
        "user_id": "admin",
        "nickname": "admin",
        "profile_url": "",
        "metadata": {}
    },
    "file": {},
    "message": "\n test page",
    "data": "",
    "message_retention_hour": -1,
    "sorted_metaarray": [
        {
            "value": [
                "{u'type': u'BK', u'extra': u'{\"menuKey\":\"20220302174707288\",\"menuId\":\"20220302174707288\",\"menuCommand\":\"agent\",\"sceId\":\"20220302"
            ],
            "key": "agent(PQ_A)"
        }
    ],
    "silent": false,
    "type": "MESG",
    "created_at": 1650519211992,
    "channel_type": "group",
    "mention_type": "users",
    "channel_url": "my channel url",
    "message_id": 1796985472
}

```

위와 같이 metaarray value값으로 넣었던 array가 string으로 변환돼서 받아집니다.  
또 글자수 제한이 있는 것인지 긴 메세지를 보낼 경우 잘려서 오는데요.

서버에서 webhook으로 받은 메세지에는 보낸 meta array와 동일하게  
value.type, value.extra 가 잘 들어있습니다.

이를 보면 sorted\_metaarray의 value가 무조건 string 하나의 값을 가져야 하는 건 아닌 것 같은데  
이와 같은 현상이 버그인지 아니면 제가 잘못 사용하고 있는 건지 궁금합니다.

또 platform api docs에서 message 설명을 보면 meta\_array에 취소선이 있고  
sorted\_metaarray가 따로 있는데 js sendbird module의 UserMessageParam에는 여전히  
meta array만 있어 직접 axios post로 메세지를 보내고 있습니다.  
이는 업데이트 될 예정이 없나요?
