合并 main:同步聊天、风控诊断与迁移基线
This commit is contained in:
commit
a6c0d36ee9
89 files changed
+2974
-365
No files matched your search
@@ -85,7 +85,25 @@ type Handler interface {
|
||||
OnAccountAlert(ctx context.Context, cookieID, level, title, body string)
|
||||
}
|
||||
|
||||
// accountEventHandler 保存账号EventHandler,供当前处理流程使用
|
||||
// MessageReadHandler 是可选的聊天已读回执端口,旧 Handler 实现不必承担该能力。
|
||||
type MessageReadHandler interface {
|
||||
// HandleMessageRead 接收已解析且不包含凭证的平台已读事件。
|
||||
HandleMessageRead(context.Context, MessageReadEvent) error
|
||||
}
|
||||
|
||||
// MessageReadEvent 是平台出站消息已读状态的非敏感事件载体。
|
||||
type MessageReadEvent struct {
|
||||
// AccountID 是当前运行时账号标识。
|
||||
AccountID string
|
||||
// ChatID 是平台会话标识。
|
||||
ChatID string
|
||||
// MessageID 是平台 PNM 消息标识。
|
||||
MessageID string
|
||||
// ReadAt 是平台或本机记录的 Unix 毫秒已读时间。
|
||||
ReadAt int64
|
||||
}
|
||||
|
||||
// accountEventHandler 保存账号事件扩展端口,供可选通知器识别类型化告警。
|
||||
type accountEventHandler interface {
|
||||
OnAccountEvent(ctx context.Context, cookieID, eventType, level, title, body string)
|
||||
}
|
||||
@@ -129,6 +147,7 @@ type ChatMessage struct {
|
||||
SenderUserID string
|
||||
SenderName string
|
||||
Text string
|
||||
MessageID string
|
||||
ItemID string
|
||||
Raw map[string]any // 解密后的完整消息
|
||||
}
|
||||
@@ -838,6 +857,26 @@ func (a *Account) SendText(ctx context.Context, chatID, toUserID, text string) e
|
||||
return a.outgoing.sendText(ctx, chatID, toUserID, text)
|
||||
}
|
||||
|
||||
// MarkChatRead 向已连接的 WebSocket 上报会话消息已读状态,调用方负责用户所有权校验。
|
||||
func (a *Account) MarkChatRead(ctx context.Context, chatID string, messageIDs []map[string]any) error {
|
||||
// conn、err 保存当前连接快照及不可发送时的生命周期错误。
|
||||
conn, _, err := a.outgoing.currentSenderState()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// readCtx、cancel 为平台上报设置固定超时,取消责任在本方法返回时释放。
|
||||
readCtx, cancel := context.WithTimeout(ctx, 5*time.Second)
|
||||
defer cancel()
|
||||
// reader、ok 保存连接是否支持可选的已读上报能力。
|
||||
reader, ok := conn.(interface {
|
||||
MarkChatRead(context.Context, string, []map[string]any) error
|
||||
})
|
||||
if !ok {
|
||||
return fmt.Errorf("当前 WebSocket 不支持已读上报")
|
||||
}
|
||||
return reader.MarkChatRead(readCtx, chatID, messageIDs)
|
||||
}
|
||||
|
||||
// SendImage 通过当前 WebSocket 给买家发送图片消息。当前仅支持可直接访问的 CDN/公网 URL。
|
||||
func (a *Account) SendImage(ctx context.Context, chatID, toUserID, imageURL string, cardID int64) error {
|
||||
return a.outgoing.sendImage(ctx, chatID, toUserID, imageURL, cardID)
|
||||
|
||||
+200
-7
@@ -3,8 +3,12 @@ package engine
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"xianyu-go/internal/xianyu/protocol"
|
||||
)
|
||||
|
||||
// dispatch 是 ws.ReceiveLoop 的回调,对每条解密后的消息做:
|
||||
@@ -19,6 +23,107 @@ func (a *Account) handleMessage(decrypted map[string]any) {
|
||||
a.messageDispatcher.handleMessage(decrypted)
|
||||
}
|
||||
|
||||
// extractMessageReadEvent 从解密 WebSocket 事件中提取出站消息已读回执。
|
||||
func extractMessageReadEvent(v map[string]any) (MessageReadEvent, bool) {
|
||||
// 40103 解密后不会保留外层 objectType,只剩下固定的紧凑字段:
|
||||
// 1=PNM 消息 ID、2=状态(2=已读)、4=会话 ID、6=事件时间。
|
||||
// 不能只在解密后的 map 里继续寻找 "bizType":40103,否则真实回执
|
||||
// 会被当成普通消息静默丢弃。
|
||||
// messageID 保存紧凑回执或嵌套事件中的平台 PNM 消息 ID。
|
||||
messageID := strings.TrimSpace(toString(v["1"]))
|
||||
// ids 保存批量回执携带的 PNM ID 列表;ok 表示字段 1 是否采用批量编码。
|
||||
if ids, ok := v["1"].([]any); ok && len(ids) > 0 {
|
||||
messageID = strings.TrimSpace(toString(ids[0]))
|
||||
}
|
||||
if strings.HasSuffix(messageID, ".PNM") && toString(v["2"]) == "2" {
|
||||
// chatID 保存紧凑回执携带的会话 ID,旧信封缺失时回退字段 3。
|
||||
chatID := strings.TrimSpace(toString(v["4"]))
|
||||
if !strings.Contains(chatID, "@goofish") {
|
||||
chatID = strings.TrimSpace(toString(v["3"]))
|
||||
}
|
||||
chatID = strings.TrimSuffix(chatID, "@goofish")
|
||||
return MessageReadEvent{ChatID: chatID, MessageID: messageID, ReadAt: time.Now().UTC().UnixMilli()}, true
|
||||
}
|
||||
// found 标记已定位 40103 信封;ev 累积其会话和消息标识;walk 递归读取兼容嵌套结构。
|
||||
var found bool
|
||||
// ev 保存从嵌套兼容回执中提取的平台会话与消息标识。
|
||||
var ev MessageReadEvent
|
||||
// walk 解析对象、数组或 JSON 字符串形式的嵌套事件,命中后停止后续遍历。
|
||||
var walk func(any)
|
||||
walk = func(x any) {
|
||||
if found {
|
||||
return
|
||||
}
|
||||
// m 保存当前遍历节点被识别出的具体 JSON 数据类型。
|
||||
switch m := x.(type) {
|
||||
case map[string]any:
|
||||
// k 为当前字段名;val 为其原始 JSON 值,用来定位回执事件类型。
|
||||
for k, val := range m {
|
||||
// lk 是小写化字段名,兼容平台信封的不同字段命名。
|
||||
lk := strings.ToLower(k)
|
||||
if lk == "biztype" || lk == "biz_type" || lk == "type" {
|
||||
if toString(val) == "40103" {
|
||||
found = true
|
||||
}
|
||||
}
|
||||
}
|
||||
if found {
|
||||
ev.MessageID = extractNestedString(m, "messageid", "message_id")
|
||||
ev.ChatID = extractNestedString(m, "cid", "chatid", "chat_id")
|
||||
if ev.MessageID == "" {
|
||||
ev.MessageID = extractNestedString(m, "id")
|
||||
}
|
||||
return
|
||||
}
|
||||
// child 为当前对象中的嵌套值,继续搜索未解包的回执信封。
|
||||
for _, child := range m {
|
||||
walk(child)
|
||||
}
|
||||
case []any:
|
||||
// child 为当前批量信封中的一个候选事件。
|
||||
for _, child := range m {
|
||||
walk(child)
|
||||
}
|
||||
case string:
|
||||
// 部分同步信封将事件体编码为转义 JSON 字符串,而非已解码对象。
|
||||
// decoded 保存反序列化后的事件体,兼容字符串包装的同步消息。
|
||||
var decoded any
|
||||
if json.Unmarshal([]byte(m), &decoded) == nil {
|
||||
walk(decoded)
|
||||
}
|
||||
}
|
||||
}
|
||||
walk(v)
|
||||
if !found || ev.MessageID == "" {
|
||||
return MessageReadEvent{}, false
|
||||
}
|
||||
return ev, true
|
||||
}
|
||||
|
||||
// extractNestedString 在嵌套信封中按大小写无关键名查找第一个非空字符串。
|
||||
func extractNestedString(m map[string]any, keys ...string) string {
|
||||
// k 是当前字段名;v 是字段原值,用于大小写无关地匹配候选键。
|
||||
for k, v := range m {
|
||||
// want 为调用方允许的目标字段名。
|
||||
for _, want := range keys {
|
||||
if strings.EqualFold(k, want) && strings.TrimSpace(toString(v)) != "" {
|
||||
return strings.TrimSpace(toString(v))
|
||||
}
|
||||
}
|
||||
}
|
||||
// v 为当前对象中的嵌套值,继续查询其中的兼容子信封。
|
||||
for _, v := range m {
|
||||
// child 为可继续递归解析的对象;ok 表示当前值是否是对象结构。
|
||||
if child, ok := v.(map[string]any); ok {
|
||||
// s 保存子信封中找到的第一个非空目标字段值。
|
||||
if s := extractNestedString(child, keys...); s != "" {
|
||||
return s
|
||||
}
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// markAndCheckDedup 提取消息 ID,检查 1 小时内是否已处理;未处理则标记。
|
||||
// 返回 true 表示应继续处理。移植自 _schedule_debounced_reply 的去重段。
|
||||
// markAndCheckDedup 负责markAndCheckDedup相关处理。
|
||||
@@ -38,16 +143,24 @@ func (a *Account) scheduleDebouncedReply(chat ChatMessage) {
|
||||
a.messageDispatcher.scheduleDebouncedReply(chat)
|
||||
}
|
||||
|
||||
// extractMessageID 从 message["1"]["10"]["bizTag"] 或 extJson 中提取 messageId。
|
||||
// 移植自 _extract_message_id。
|
||||
// extractMessageID 负责extract消息ID相关处理。
|
||||
// extractMessageID 提取闲鱼消息状态接口使用的消息 ID。
|
||||
//
|
||||
// 实时 WS 聊天消息同时包含两种 ID:message["1"]["3"] 是消息在 IM
|
||||
// 服务中的 PNM ID,/r/MessageStatus/read 使用的正是这个 ID;10.bizTag、
|
||||
// extJson 和 reminderUrl 里的 messageId 是通知/推送侧的关联 ID,不能用来
|
||||
// 上报会话已读。历史消息接口也返回 PNM ID,因此优先使用字段 3,其他
|
||||
// 字段只作为兼容旧消息或缺失字段 3 的兜底。
|
||||
func extractMessageID(decrypted map[string]any) string {
|
||||
// m1、ok 保存m1、ok,供当前处理流程使用
|
||||
m1, ok := decrypted["1"].(map[string]any)
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
// m10、ok 保存m10、ok,供当前处理流程使用
|
||||
// id 保存实时消息最可靠的 PNM ID,存在时不可用推送关联 ID 覆盖。
|
||||
if id := strings.TrimSpace(toString(m1["3"])); id != "" && id != "<nil>" {
|
||||
return id
|
||||
}
|
||||
// m10、ok 保存消息展示扩展及其是否存在,用于兼容旧消息关联 ID。
|
||||
m10, ok := m1["10"].(map[string]any)
|
||||
if !ok {
|
||||
return ""
|
||||
@@ -66,6 +179,55 @@ func extractMessageID(decrypted map[string]any) string {
|
||||
return id
|
||||
}
|
||||
}
|
||||
// reminderURL 保存提醒链接,旧消息会将推送关联 ID 编码在其查询参数中。
|
||||
if reminderURL, _ := m10["reminderUrl"].(string); reminderURL != "" {
|
||||
// parsed 保存已解析的提醒链接;err 表示 URL 格式不合法时的解析失败。
|
||||
if parsed, err := url.Parse(reminderURL); err == nil {
|
||||
// id 保存 reminderUrl 查询参数中的兼容消息关联 ID。
|
||||
if id := strings.TrimSpace(parsed.Query().Get("messageId")); id != "" {
|
||||
return id
|
||||
}
|
||||
}
|
||||
}
|
||||
return findMessageID(decrypted)
|
||||
}
|
||||
|
||||
// findMessageID 递归解析兼容消息信封中可能存在的关联消息 ID。
|
||||
func findMessageID(value any) string {
|
||||
// x 保存当前待搜索节点的具体值,按对象、数组和 JSON 字符串分别处理。
|
||||
switch x := value.(type) {
|
||||
case map[string]any:
|
||||
// key 是对象字段名;child 是字段值,用于先检查本层关联 ID。
|
||||
for key, child := range x {
|
||||
if strings.EqualFold(key, "messageId") || strings.EqualFold(key, "message_id") {
|
||||
// id 保存当前字段提供的非空关联消息 ID。
|
||||
if id := strings.TrimSpace(fmt.Sprint(child)); id != "" && id != "<nil>" {
|
||||
return id
|
||||
}
|
||||
}
|
||||
}
|
||||
// child 为本层嵌套字段值,递归兼容更深层信封。
|
||||
for _, child := range x {
|
||||
// id 保存子节点中首先发现的关联消息 ID。
|
||||
if id := findMessageID(child); id != "" {
|
||||
return id
|
||||
}
|
||||
}
|
||||
case []any:
|
||||
// child 为批量消息中的一个候选事件或子信封。
|
||||
for _, child := range x {
|
||||
// id 保存数组成员中首先发现的关联消息 ID。
|
||||
if id := findMessageID(child); id != "" {
|
||||
return id
|
||||
}
|
||||
}
|
||||
case string:
|
||||
// decoded 保存从 JSON 字符串解码后的兼容嵌套结构。
|
||||
var decoded any
|
||||
if json.Unmarshal([]byte(x), &decoded) == nil {
|
||||
return findMessageID(decoded)
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -110,9 +272,14 @@ func extractChatMessage(decrypted map[string]any, accountID, cookieStr string) *
|
||||
if i := strings.Index(chatID, "@"); i >= 0 {
|
||||
chatID = chatID[:i]
|
||||
}
|
||||
// senderUserID 保存sender用户ID,供当前处理流程使用
|
||||
senderUserID, _ := m10["senderUserId"].(string)
|
||||
// senderName 保存sender名称,供当前处理流程使用
|
||||
// senderUserID 保存经兼容字段归一后的发送者身份。
|
||||
senderUserID := extractChatSenderUserIDFromMaps(m1, m10)
|
||||
if isSelfUserID(senderUserID, protocol.TransCookies(cookieStr)["unb"]) {
|
||||
// 官方客户端会通过同一 WebSocket 回显本账号发出的消息;它仅表示投递观察,
|
||||
// 并非买家新输入,绝不能进入自动回复链。
|
||||
return nil
|
||||
}
|
||||
// senderName 保存发送者展示名称,字段缺失时由提醒标题补齐。
|
||||
senderName, _ := m10["senderNick"].(string)
|
||||
if strings.TrimSpace(senderName) == "" {
|
||||
senderName, _ = m10["reminderTitle"].(string)
|
||||
@@ -128,11 +295,37 @@ func extractChatMessage(decrypted map[string]any, accountID, cookieStr string) *
|
||||
SenderUserID: senderUserID,
|
||||
SenderName: senderName,
|
||||
Text: reminder,
|
||||
MessageID: extractMessageID(decrypted),
|
||||
ItemID: itemID,
|
||||
Raw: decrypted,
|
||||
}
|
||||
}
|
||||
|
||||
// extractChatSenderUserIDFromMaps 优先读取展示扩展,并兼容紧凑信封中的发送者账号 ID。
|
||||
func extractChatSenderUserIDFromMaps(m1, m10 map[string]any) string {
|
||||
if m10 != nil {
|
||||
// sender 保存标准 senderUserId 的去空白结果。
|
||||
if sender := strings.TrimSpace(toString(m10["senderUserId"])); sender != "" {
|
||||
return sender
|
||||
}
|
||||
}
|
||||
// 部分回显消息缺少 10.senderUserId,但仍在紧凑 1.1 信封中保留发送者身份。
|
||||
// sender 保存紧凑信封中的发送者对象;ok 表示该兼容字段是否存在。
|
||||
if sender, ok := m1["1"].(map[string]any); ok {
|
||||
return strings.TrimSpace(toString(sender["1"]))
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// isSelfUserID 比较发送者与当前账号身份,忽略 IM 协议后缀以过滤官方客户端回显。
|
||||
func isSelfUserID(senderUserID, selfUserID string) bool {
|
||||
// sender 是归一化后的消息发送者身份。
|
||||
sender := strings.TrimSuffix(strings.TrimSpace(senderUserID), "@goofish")
|
||||
// self 是归一化后的当前账号身份。
|
||||
self := strings.TrimSuffix(strings.TrimSpace(selfUserID), "@goofish")
|
||||
return sender != "" && self != "" && sender == self
|
||||
}
|
||||
|
||||
// isNonUserChatNotice 判断闲鱼 IM 中不应进入自动回复的系统提示或交易卡片。
|
||||
// 典型样本:
|
||||
// - contentType=14:“有蚂蚁森林能量可领”“不想宝贝被砍价?设置不砍价回复”“退款成功”
|
||||
|
||||
@@ -146,6 +146,24 @@ func TestHandleMessage_DedupSkipsRepeat(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestHandleMessage_IgnoresOwnWebSocketEcho 验证当前账号的 WS 回显不会触发自动回复。
|
||||
func TestHandleMessage_IgnoresOwnWebSocketEcho(t *testing.T) {
|
||||
// acc 是待测账号;h 记录业务处理调用;cleanup 释放测试数据库和运行时资源。
|
||||
acc, h, _, cleanup := newAccountForTest(t)
|
||||
defer cleanup()
|
||||
defer acc.Stop()
|
||||
|
||||
// newAccountForTest 使用 unb=123;模拟同一账号在闲鱼官方客户端发出的
|
||||
// 消息回显,不能进入自动回复或业务消息处理链。
|
||||
acc.handleMessage(plainChatMessage(t, "官方客户端发送", "123", "chat-own"))
|
||||
time.Sleep(MessageDebounceDelay + 200*time.Millisecond)
|
||||
h.mu.Lock()
|
||||
defer h.mu.Unlock()
|
||||
if len(h.chats) != 0 {
|
||||
t.Fatalf("账号自身消息回显不应触发自动回复,got %d", len(h.chats))
|
||||
}
|
||||
}
|
||||
|
||||
// TestHandleMessage_NoReminderNoOp 无 reminderContent 的消息不进入回复链也不报错。
|
||||
func TestHandleMessage_NoReminderNoOp(t *testing.T) {
|
||||
// acc、h、cleanup 保存acc、h、cleanup,供当前处理流程使用
|
||||
@@ -584,3 +602,22 @@ func plainChatMessage(t *testing.T, text, senderUserID, chatID string) map[strin
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
// TestExtractMessageReadEvent40103 验证紧凑和批量 40103 已读事件均能生成规范回执。
|
||||
func TestExtractMessageReadEvent40103(t *testing.T) {
|
||||
// event 是单条紧凑回执的解析结果;ok 表示该输入已被识别为已读事件。
|
||||
event, ok := extractMessageReadEvent(map[string]any{
|
||||
"1": "4263141580162.PNM", "2": 2, "3": 0,
|
||||
"4": "64725235816@goofish", "5": 1, "6": 1786945729928,
|
||||
})
|
||||
if !ok || event.MessageID != "4263141580162.PNM" || event.ChatID != "64725235816" || event.ReadAt <= 0 {
|
||||
t.Fatalf("40103 event=%+v ok=%v", event, ok)
|
||||
}
|
||||
// batch 是批量编码回执的解析结果;ok 复用为该回执的事件识别结果。
|
||||
batch, ok := extractMessageReadEvent(map[string]any{
|
||||
"1": []any{"4263107993838.PNM"}, "2": 2, "3": "64725235816@goofish", "4": 1,
|
||||
})
|
||||
if !ok || batch.MessageID != "4263107993838.PNM" || batch.ChatID != "64725235816" {
|
||||
t.Fatalf("40103 batch event=%+v ok=%v", batch, ok)
|
||||
}
|
||||
}
|
||||
@@ -124,7 +124,20 @@ func TestExtractChatMessageUsesReminderTitleAsNickname(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestExtractChatMessage_FiltersRefundTradeCard 负责TestExtract聊天消息FiltersRefundTrade卡密相关处理。
|
||||
// TestExtractChatMessageIgnoresOwnWebSocketEcho 验证账号自身的 WebSocket 回显不会进入回复链。
|
||||
func TestExtractChatMessageIgnoresOwnWebSocketEcho(t *testing.T) {
|
||||
// decrypted 模拟账号自身发送后由同一 WebSocket 回传的解密聊天信封。
|
||||
decrypted := map[string]any{"1": map[string]any{
|
||||
"2": "chat-1@goofish",
|
||||
"10": map[string]any{"reminderContent": "我在官方客户端发送的消息", "senderUserId": "self-1", "senderNick": "我"},
|
||||
}}
|
||||
// chat 是提取结果;账号自身的回显必须被过滤,因此应为 nil。
|
||||
if chat := extractChatMessage(decrypted, "account-1", "unb=self-1;"); chat != nil {
|
||||
t.Fatalf("账号自身发送的 WS 回显不应进入自动回复链: %+v", chat)
|
||||
}
|
||||
}
|
||||
|
||||
// TestExtractChatMessage_FiltersRefundTradeCard 验证退款交易卡不会被识别为用户聊天。
|
||||
func TestExtractChatMessage_FiltersRefundTradeCard(t *testing.T) {
|
||||
// decrypted 保存decrypted,供当前处理流程使用
|
||||
decrypted := mustRefundTradeCard(t)
|
||||
|
||||
@@ -157,6 +157,21 @@ func (d *messageDispatcher) handleMessage(decrypted map[string]any) {
|
||||
|
||||
// handleMessageContext 将系统事件和聊天消息分别交给对应业务链。
|
||||
func (d *messageDispatcher) handleMessageContext(ctx context.Context, decrypted map[string]any) {
|
||||
// receipt、ok 保存解析出的平台已读回执及是否命中已读事件格式。
|
||||
if receipt, ok := extractMessageReadEvent(decrypted); ok {
|
||||
receipt.AccountID = d.cookieID
|
||||
// handler 保存当前可选处理器;旧集成不实现回执端口时保持兼容。
|
||||
if handler := d.currentHandler(); handler != nil {
|
||||
// reader 是可消费已读回执的可选端口;supported 表示当前集成实现了该端口。
|
||||
if reader, supported := handler.(MessageReadHandler); supported {
|
||||
// err 保存回执持久化错误;失败不应中断 WebSocket 接收循环。
|
||||
if err := reader.HandleMessageRead(ctx, receipt); err != nil {
|
||||
d.logger.Warn("处理聊天已读回执失败", "err", err, "message_id", receipt.MessageID)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
// 系统卡片和平台通知优先进入自动化中心,永远不进入 AI 回复范围。
|
||||
if task := automation.ExtractTaskFromWS(d.cookieID, d.currentCookie(), decrypted); task != nil {
|
||||
if // handler 保存handler,供当前处理流程使用
|
||||
|
||||
@@ -262,18 +262,19 @@ func TestParseMessageIDFromJSON(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestExtractMessageID 优先 bizTag,其次 extJson,无则空。
|
||||
// TestExtractMessageID 优先实时消息的 PNM ID,其次兼容 bizTag/extJson,无则空。
|
||||
func TestExtractMessageID(t *testing.T) {
|
||||
if // got 保存got,供当前处理流程使用
|
||||
got := extractMessageID(map[string]any{
|
||||
"1": map[string]any{
|
||||
"3": "4263141580162.PNM",
|
||||
"10": map[string]any{
|
||||
"bizTag": `{"messageId":"biz-id"}`,
|
||||
"extJson": `{"messageId":"ext-id"}`,
|
||||
},
|
||||
},
|
||||
}); got != "biz-id" {
|
||||
t.Errorf("bizTag 优先: got %q", got)
|
||||
}); got != "4263141580162.PNM" {
|
||||
t.Errorf("PNM 优先: got %q", got)
|
||||
}
|
||||
if // got 保存got,供当前处理流程使用
|
||||
got := extractMessageID(map[string]any{
|
||||
|
||||
Reference in new issue
Block a user