Skip to content

Commit

Permalink
fix(dingtalk): add missing isDirect
Browse files Browse the repository at this point in the history
  • Loading branch information
XxLittleCxX committed Nov 20, 2023
1 parent 1f07c98 commit 0644155
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion adapters/dingtalk/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ export async function decodeMessage<C extends Context>(bot: DingtalkBot<C>, body

if (body.conversationType === '1') {
session.channelId = session.userId
session.isDirect = true
} else {
const atUsers = body.atUsers.filter(v => v.dingtalkId !== body.chatbotUserId).map(v => h.at(v.staffId))
session.elements = [h.at(body.robotCode), ...atUsers, ...session.elements]
session.elements = [h.at(body.robotCode), ...atUsers]
session.channelId = body.conversationId
session.isDirect = false
}
if (body.conversationTitle) {
session.event.channel.name = body.conversationTitle
Expand Down

0 comments on commit 0644155

Please sign in to comment.