fix: 自审批场景也发送卡片样式消息
移除自审批检测逻辑,让所有审批消息(包括自审批)都发送卡片样式消息,提升用户体验一致性。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -154,15 +154,7 @@ class FeishuNotificationService
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检查是否是申请人自己 - 发送文本消息而不是卡片
|
||||
error_log("🔍 自审批检查前: applicant_id=" . var_export($applicantId, true) . ", user_id=" . var_export($userId, true));
|
||||
|
||||
if ($applicantId && (int)$applicantId === (int)$userId) {
|
||||
error_log("🔄 检测到自审批,发送文本通知而不是卡片");
|
||||
return $this->sendTextNotification($feishuUserId, $params);
|
||||
}
|
||||
|
||||
error_log("📨 发送卡片消息: 不是自审批");
|
||||
// 发送卡片消息(包括自审批场景)
|
||||
$card = $this->buildApprovalCard($params, $user->company_id);
|
||||
$messageId = $this->sendMessage($feishuUserId, $card, $orderId, $nodeId, $userId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user