feat(utils): implement message rendering utilities and enhance message handling in services

This commit is contained in:
mlogclub
2026-04-17 12:40:47 +08:00
parent 9d76d5d505
commit 9efec4d379
6 changed files with 307 additions and 220 deletions
+2 -2
View File
@@ -14,12 +14,12 @@ func TestAllowAIMessageOnPendingHandoff(t *testing.T) {
CurrentAssigneeID: 0,
HandoffAt: ptrTime(time.Now()),
}
if !allowAIMessageOnPendingHandoff(conversation) {
if !MessageService.allowAIMessageOnPendingHandoff(conversation) {
t.Fatalf("expected pending handoff conversation to allow ai handoff notice")
}
conversation.Status = enums.IMConversationStatusAIServing
if allowAIMessageOnPendingHandoff(conversation) {
if MessageService.allowAIMessageOnPendingHandoff(conversation) {
t.Fatalf("expected ai serving conversation not to use pending handoff allowance")
}
}