Fix PR linter findings for heartbeat routing changes
This commit is contained in:
parent
1f94c277ce
commit
d6f632f3e2
3 changed files with 12 additions and 3 deletions
|
|
@ -3603,7 +3603,7 @@ func (al *AgentLoop) handleHeartbeatCommand(args []string, msg bus.InboundMessag
|
|||
}
|
||||
|
||||
arg := strings.ToLower(strings.TrimSpace(args[1]))
|
||||
threadID := 0
|
||||
var threadID int
|
||||
var err error
|
||||
|
||||
switch arg {
|
||||
|
|
|
|||
|
|
@ -1068,7 +1068,14 @@ func TestSplitChatAndThread(t *testing.T) {
|
|||
t.Run(tt.name, func(t *testing.T) {
|
||||
gotChatID, gotThread := splitChatAndThread(tt.chatID)
|
||||
if gotChatID != tt.wantChatID || gotThread != tt.wantThread {
|
||||
t.Fatalf("splitChatAndThread(%q) = (%q, %d), want (%q, %d)", tt.chatID, gotChatID, gotThread, tt.wantChatID, tt.wantThread)
|
||||
t.Fatalf(
|
||||
"splitChatAndThread(%q) = (%q, %d), want (%q, %d)",
|
||||
tt.chatID,
|
||||
gotChatID,
|
||||
gotThread,
|
||||
tt.wantChatID,
|
||||
tt.wantThread,
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -273,7 +273,9 @@ func (hs *HeartbeatService) resolveTelegramThreadTarget(threadID int) (channel,
|
|||
if ch != "telegram" || cid == "" {
|
||||
continue
|
||||
}
|
||||
return ch, withTelegramThread(cid, threadID), fmt.Sprintf("telegram heartbeat_thread_id from %s", candidate.reason)
|
||||
return ch,
|
||||
withTelegramThread(cid, threadID),
|
||||
fmt.Sprintf("telegram heartbeat_thread_id from %s", candidate.reason)
|
||||
}
|
||||
|
||||
return "", "", ""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue