Skip to content

Commit

Permalink
fix(dingtalk): send private message
Browse files Browse the repository at this point in the history
  • Loading branch information
XxLittleCxX committed Nov 22, 2023
1 parent 4cc7a3a commit 9455154
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions adapters/dingtalk/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ export async function decodeMessage<C extends Context>(bot: DingtalkBot<C>, body
session.type = 'message'
session.messageId = body.msgId
session.guildId = body.chatbotCorpId
session.event.user = {
id: body.senderStaffId,
name: body.senderNick,
}

if (body.conversationType === '1') {
session.channelId = session.userId
Expand All @@ -21,10 +25,6 @@ export async function decodeMessage<C extends Context>(bot: DingtalkBot<C>, body
session.event.channel.name = body.conversationTitle
}

session.event.user = {
id: body.senderStaffId,
name: body.senderNick,
}
session.event.member = {
roles: body.isAdmin ? ['admin'] : [],
}
Expand Down

0 comments on commit 9455154

Please sign in to comment.