From e6f1232582b0e7e01f5ca5594ae9d4c2c2948611 Mon Sep 17 00:00:00 2001 From: icey-yu <119291641+icey-yu@users.noreply.github.com> Date: Thu, 27 Jun 2024 17:54:42 +0800 Subject: [PATCH] fix: message can store Ex (#2371) --- 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 180342e59..ba63fbb66 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 e79b47722..6ea6a29ed 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.