From be62b3743671c4bcc59422757b9d21a4eb3f683e Mon Sep 17 00:00:00 2001 From: icey-yu <1186114839@qq.com> Date: Thu, 27 Jun 2024 17:17:28 +0800 Subject: [PATCH] fix: message can store Ex --- internal/api/msg.go | 1 + pkg/apistruct/manage.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/internal/api/msg.go b/internal/api/msg.go index 180342e591..ba63fbb66f 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -101,6 +101,7 @@ func (m MessageApi) newUserSendMsgReq(_ *gin.Context, params *apistruct.SendMsg) SendTime: params.SendTime, Options: options, OfflinePushInfo: params.OfflinePushInfo, + Ex: params.Ex, }, } return &pbData diff --git a/pkg/apistruct/manage.go b/pkg/apistruct/manage.go index e79b477222..6ea6a29ed6 100644 --- a/pkg/apistruct/manage.go +++ b/pkg/apistruct/manage.go @@ -55,6 +55,9 @@ type SendMsg struct { // OfflinePushInfo contains information for offline push notifications. OfflinePushInfo *sdkws.OfflinePushInfo `json:"offlinePushInfo"` + + // Ex stores extended fields + Ex string `json:"ex"` } // SendMsgReq extends SendMsg with the requirement of RecvID when SessionType indicates a one-on-one or notification chat.