mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-26 21:22:16 +08:00
feat: support quote ContentType in SendMsg.
This commit is contained in:
parent
269dd7180f
commit
3475148d42
@ -173,6 +173,8 @@ func (m *MessageApi) getSendMsgReq(c *gin.Context, req apistruct.SendMsg) (sendM
|
||||
data = apistruct.AtElem{}
|
||||
case constant.Custom:
|
||||
data = apistruct.CustomElem{}
|
||||
case constant.Quote:
|
||||
data = apistruct.QuoteElem{}
|
||||
case constant.OANotification:
|
||||
data = apistruct.OANotificationElem{}
|
||||
req.SessionType = constant.NotificationChatType
|
||||
|
||||
@ -14,6 +14,8 @@
|
||||
|
||||
package apistruct
|
||||
|
||||
import "github.com/openimsdk/protocol/sdkws"
|
||||
|
||||
type PictureBaseInfo struct {
|
||||
UUID string `mapstructure:"uuid"`
|
||||
Type string `mapstructure:"type" validate:"required"`
|
||||
@ -85,6 +87,11 @@ type RevokeElem struct {
|
||||
RevokeMsgClientID string `mapstructure:"revokeMsgClientID" validate:"required"`
|
||||
}
|
||||
|
||||
type QuoteElem struct {
|
||||
Text string `json:"text,omitempty"`
|
||||
QuoteMessage *MsgStruct `json:"quoteMessage,omitempty"`
|
||||
}
|
||||
|
||||
type OANotificationElem struct {
|
||||
NotificationName string `mapstructure:"notificationName" json:"notificationName" validate:"required"`
|
||||
NotificationFaceURL string `mapstructure:"notificationFaceURL" json:"notificationFaceURL"`
|
||||
@ -98,6 +105,7 @@ type OANotificationElem struct {
|
||||
FileElem *FileElem `mapstructure:"fileElem" json:"fileElem"`
|
||||
Ex string `mapstructure:"ex" json:"ex"`
|
||||
}
|
||||
|
||||
type MessageRevoked struct {
|
||||
RevokerID string `mapstructure:"revokerID" json:"revokerID" validate:"required"`
|
||||
RevokerRole int32 `mapstructure:"revokerRole" json:"revokerRole" validate:"required"`
|
||||
@ -106,3 +114,38 @@ type MessageRevoked struct {
|
||||
SessionType int32 `mapstructure:"sessionType" json:"sessionType" validate:"required"`
|
||||
Seq uint32 `mapstructure:"seq" json:"seq" validate:"required"`
|
||||
}
|
||||
|
||||
type MsgStruct struct {
|
||||
ClientMsgID string `json:"clientMsgID,omitempty"`
|
||||
ServerMsgID string `json:"serverMsgID,omitempty"`
|
||||
CreateTime int64 `json:"createTime"`
|
||||
SendTime int64 `json:"sendTime"`
|
||||
SessionType int32 `json:"sessionType"`
|
||||
SendID string `json:"sendID,omitempty"`
|
||||
RecvID string `json:"recvID,omitempty"`
|
||||
MsgFrom int32 `json:"msgFrom"`
|
||||
ContentType int32 `json:"contentType"`
|
||||
SenderPlatformID int32 `json:"senderPlatformID"`
|
||||
SenderNickname string `json:"senderNickname,omitempty"`
|
||||
SenderFaceURL string `json:"senderFaceUrl,omitempty"`
|
||||
GroupID string `json:"groupID,omitempty"`
|
||||
Content string `json:"content,omitempty"`
|
||||
Seq int64 `json:"seq"`
|
||||
IsRead bool `json:"isRead"`
|
||||
Status int32 `json:"status"`
|
||||
IsReact bool `json:"isReact,omitempty"`
|
||||
IsExternalExtensions bool `json:"isExternalExtensions,omitempty"`
|
||||
OfflinePush *sdkws.OfflinePushInfo `json:"offlinePush,omitempty"`
|
||||
AttachedInfo string `json:"attachedInfo,omitempty"`
|
||||
Ex string `json:"ex,omitempty"`
|
||||
LocalEx string `json:"localEx,omitempty"`
|
||||
TextElem *TextElem `json:"textElem,omitempty"`
|
||||
PictureElem *PictureElem `json:"pictureElem,omitempty"`
|
||||
SoundElem *SoundElem `json:"soundElem,omitempty"`
|
||||
VideoElem *VideoElem `json:"videoElem,omitempty"`
|
||||
FileElem *FileElem `json:"fileElem,omitempty"`
|
||||
AtTextElem *AtElem `json:"atTextElem,omitempty"`
|
||||
LocationElem *LocationElem `json:"locationElem,omitempty"`
|
||||
CustomElem *CustomElem `json:"customElem,omitempty"`
|
||||
QuoteElem *QuoteElem `json:"quoteElem,omitempty"`
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user