我有一个订阅messages.im事件的应用,当由两个用户之间的直接消息触发时,我将以下json发送到我的回调URI(每个标识符都经过编辑以使其匿名):
{
"token": "K5ROtL7xMS1Fv8zo8V33IAx8",
"team_id": "T32SZGR2P",
"api_app_id": "AP50R2741",
"event": {
"client_msg_id": "ca24d63d-c022-4629-a618-9d9a2ee0097c",
"type": "message",
"text": "test message\n<@ULAJP1B25>",
"user": "U232XAB7X",
"ts": "1592504332.001900",
"team": "T32SZGR2P",
"blocks": [
{
"type": "rich_text",
"block_id": "T2Fe6",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "test message\n"
},
{
"type": "user",
"user_id": "ULAJP1B25"
}
]
}
]
}
],
"channel": "DLAJ2HDNU",
"event_ts": "1592504332.001900",
"channel_type": "im"
},
"type": "event_callback",
"event_id": "Ev211G7DRFK7",
"event_time": 1592504332,
"authed_users": [
"U232XAB7X"
]
}
我在这里有两个问题:
channel
(DLAJ2HDNU
)无效,它给出channel_not_found
。我尝试通过conversations.info收集有关对话的更多信息,但它也
给出channel_not_found
; user
属性,用于定义发送消息的人。所以我的问题是:我怎样才能达到1和2?
此外,对于上下文,我的目标是监听@mentions
并定向消息,以便检查所提及的用户/收件人是否是afk,并向所提及的任何人发送消息,说他们可能需要一段时间才能回答