fix(wecom): update CanonicalID generation to use identity.BuildCanonicalID for consistency

This commit is contained in:
Zhang Rui 2026-02-28 23:46:04 +08:00
parent 79b7fb7792
commit 55c556a4c5

View file

@ -17,6 +17,7 @@ import (
"github.com/sipeed/picoclaw/pkg/bus" "github.com/sipeed/picoclaw/pkg/bus"
"github.com/sipeed/picoclaw/pkg/channels" "github.com/sipeed/picoclaw/pkg/channels"
"github.com/sipeed/picoclaw/pkg/config" "github.com/sipeed/picoclaw/pkg/config"
"github.com/sipeed/picoclaw/pkg/identity"
"github.com/sipeed/picoclaw/pkg/logger" "github.com/sipeed/picoclaw/pkg/logger"
"github.com/sipeed/picoclaw/pkg/utils" "github.com/sipeed/picoclaw/pkg/utils"
) )
@ -531,7 +532,7 @@ func (c *WeComAIBotChannel) handleTextMessage(
sender := bus.SenderInfo{ sender := bus.SenderInfo{
Platform: "wecom_aibot", Platform: "wecom_aibot",
PlatformID: userID, PlatformID: userID,
CanonicalID: "wecom_aibot:" + userID, CanonicalID: identity.BuildCanonicalID("wecom_aibot", userID),
DisplayName: userID, DisplayName: userID,
} }
peerKind := "direct" peerKind := "direct"