Files
wechat_ipad_pro/db/callback_wrapper.go
2026-02-17 13:06:23 +08:00

21 lines
702 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package db
import (
"xiawan/wx/protobuf/wechat"
)
// CallbackMessageWrapper callback消息包装结构体用于包含UUID信息
type CallbackMessageWrapper struct {
Key string `json:"key"` // UUID标识用于区分是哪个微信收到的消息
Message *wechat.AddMsg `json:"message"` // 原始消息内容
Type string `json:"type"` // 消息类型,如"message"、"contact_sync"等
}
// NewCallbackMessageWrapper 创建新的callback消息包装器
func NewCallbackMessageWrapper(key string, message *wechat.AddMsg, msgType string) *CallbackMessageWrapper {
return &CallbackMessageWrapper{
Key: key,
Message: message,
Type: msgType,
}
}