add QQ channel support

This commit is contained in:
yinwm
2026-02-10 09:46:07 +08:00
parent 9936dbce52
commit 2b3de5cae5
8 changed files with 473 additions and 7 deletions

View File

@@ -2,6 +2,7 @@ package channels
import (
"context"
"fmt"
"github.com/sipeed/picoclaw/pkg/bus"
)
@@ -60,13 +61,17 @@ func (c *BaseChannel) HandleMessage(senderID, chatID, content string, media []st
return
}
// 生成 SessionKey: channel:chatID
sessionKey := fmt.Sprintf("%s:%s", c.name, chatID)
msg := bus.InboundMessage{
Channel: c.name,
SenderID: senderID,
ChatID: chatID,
Content: content,
Media: media,
Metadata: metadata,
Channel: c.name,
SenderID: senderID,
ChatID: chatID,
Content: content,
Media: media,
Metadata: metadata,
SessionKey: sessionKey,
}
c.bus.PublishInbound(msg)