# 房间消息事件


## 加入或者退出房间

```json
{
    "sequence": 8843946,
    "type": "3001",
    "notify_type": "",
    "data": {
        "room_base_info": {
            "room_avatar": "",
            "room_id": "3587810143523774464",
            "room_name": "bot"
        },
        "state": 1,
        "user_info": {
            "avatar": "https://imgheybox.max-c.com/avatar/2024/05/22/d00c1ab1820ee5860372aadaf57cb4f9.png",
            "avatar_decoration": {
                "src_type": "",
                "src_url": ""
            },
            "bot": false,
            "level": 2,
            "medals": null,
            "nickname": "测试测试222",
            "tag": null,
            "user_id": 8829926
        }
    },
    "timestamp": 1728543055004
}
```

其中，“type: '3001'”代表用户添加或删除加入或者退出房间。

“data”对象具体内容如下：

|字段|类型|描述|
|----|----|----|
|**room_base_info**|object|房间基础信息,具体查看[通用推送字段](https://s.apifox.cn/43256fe4-9a8c-4f22-949a-74a3f8b431f5/5254214m0.md)中的room_base_info字段|
|**user_info**|object|用户信息,具体查看[通用推送字段](https://s.apifox.cn/43256fe4-9a8c-4f22-949a-74a3f8b431f5/5254214m0.md)中的user_info|
|**state**|int|用户加入还是退出房间.1加入房间,0退出房间|
