mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
fix(channels/dingtalk): prioritize senderStaffId over senderId for allowedUsers matching (#3294)
DingTalk provides two user identifiers: `senderId` (an internal platform ID like `$:LWCP_v1:xxx`) and `senderStaffId` (the human-readable staff/employee ID). The current code uses `senderId` first when constructing the Envelope, which means `allowedUsers` configuration cannot match against the staff ID that users actually know and configure. Swap the priority so `senderStaffId` is preferred when available, falling back to `senderId` only when `senderStaffId` is absent. Made-with: Cursor
This commit is contained in:
parent
f6271c61b6
commit
0ca2d23103
1 changed files with 1 additions and 1 deletions
|
|
@ -534,7 +534,7 @@ export class DingtalkChannel extends ChannelBase {
|
|||
|
||||
const envelope: Envelope = {
|
||||
channelName: this.name,
|
||||
senderId: data.senderId || data.senderStaffId || '',
|
||||
senderId: data.senderStaffId || data.senderId || '',
|
||||
senderName: data.senderNick || 'Unknown',
|
||||
chatId,
|
||||
text: cleanText || content.text,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue