first commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user