|
@@ -60,18 +60,17 @@ type FirebaseMessage struct {
|
|
|
type (
|
|
|
// ChatingContent to client chating message
|
|
|
ChatingContent struct {
|
|
|
- MessageId string `json:"messageId"`
|
|
|
- SessionId string `json:"sessionId"`
|
|
|
- Receiver string `json:"receiver"`
|
|
|
- PayloadType ChatingContentType `json:"payloadType"`
|
|
|
- Payload any `json:"payload"`
|
|
|
- SendTime int64 `json:"sendTime"`
|
|
|
+ MessageId string `json:"messageId" mapstructure:"messageId"`
|
|
|
+ Receiver string `json:"receiver" mapstructure:"receiver"`
|
|
|
+ PayloadType ChatingContentType `json:"payloadType" mapstructure:"payloadType"`
|
|
|
+ Payload any `json:"payload" mapstructure:"payload"`
|
|
|
+ SendTime int64 `json:"sendTime" mapstructure:"sendTime"`
|
|
|
}
|
|
|
|
|
|
// NotificationContent to client notice message
|
|
|
NotificationContent struct {
|
|
|
- ID int `json:"id"`
|
|
|
- Payload map[string]interface{} `json:"payload"`
|
|
|
+ ID int `json:"id" mapstructure:"id"`
|
|
|
+ Payload map[string]interface{} `json:"payload" mapstructure:"payload"`
|
|
|
}
|
|
|
|
|
|
LocationMessageContent struct {
|
|
@@ -84,31 +83,31 @@ type (
|
|
|
}
|
|
|
|
|
|
VideoCallMessageContent struct {
|
|
|
- AccountId string `json:"accountId"` // AccountId 账号ID
|
|
|
+ AccountId string `json:"accountId" mapstructure:"accountId"` // AccountId 账号ID
|
|
|
}
|
|
|
)
|
|
|
|
|
|
type (
|
|
|
// ContentText received a text message from the client
|
|
|
ContentText struct {
|
|
|
- Raw string `json:"raw"`
|
|
|
+ Raw string `json:"raw" mapstructure:"raw"`
|
|
|
}
|
|
|
|
|
|
// ContentMetadata received media file message from client
|
|
|
ContentMetadata struct {
|
|
|
- Url string `json:"url"` // Url 文件地址
|
|
|
- FileType string `json:"fileType"` // FileType 文件类型
|
|
|
- Duration uint `json:"duration"` // Duration 视频/语音时长
|
|
|
+ Url string `json:"url" mapstructure:""` // Url 文件地址
|
|
|
+ FileType string `json:"fileType" mapstructure:""` // FileType 文件类型
|
|
|
+ Duration uint `json:"duration" mapstructure:""` // Duration 视频/语音时长
|
|
|
}
|
|
|
|
|
|
// ContentReply content to be replied to after receiving the message
|
|
|
ContentReply struct {
|
|
|
- MessageId string `json:"messageId"`
|
|
|
+ MessageId string `json:"messageId" mapstructure:"messageId"`
|
|
|
}
|
|
|
|
|
|
// ContentError an error occurred while processing the message
|
|
|
ContentError struct {
|
|
|
- Err string `json:"err"`
|
|
|
+ Err string `json:"err" mapstructure:"err"`
|
|
|
}
|
|
|
)
|
|
|
|