Skip to content

Commit 5ebfa70

Browse files
committed
Merge branch 'v4.0.x' into 'master'
feat:Add the disableUpdateLastMsg function and optimize the message sending interface See merge request public-server/server-sdk-go!10
2 parents cfbdedc + 701385d commit 5ebfa70

9 files changed

Lines changed: 428 additions & 138 deletions

File tree

sdk/entrustgroup.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ type EntrustGroupDetailInfo struct {
219219
JoinTime int64 `json:"joinTime"` // Join time
220220
Role int `json:"role"` // Role
221221
Count int `json:"count"` // Member count
222+
Owner string `json:"owner"` // Group owner ID
222223
}
223224

224225
// Helper function: validate group ID

sdk/group.go

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -249,16 +249,17 @@ func (rc *RongCloud) GroupUserQuery(userId string) ([]byte, error) {
249249
}
250250

251251
type MessageOptions struct {
252-
BindNotifyMsg bool `json:"bindNotifyMsg"` // Whether to bind the notification message and not deliver the corresponding message.
253-
FromUserId string `json:"fromUserId"` // The user ID of the message sender.
254-
ObjectName string `json:"objectName"` // The name of the message object.
255-
Content string `json:"content"` // The content of the message.
256-
PushContent string `json:"pushContent"` // The content of the push message.
257-
PushData string `json:"pushData"` // The data of the push message.
258-
IsIncludeSender int `json:"isIncludeSender"` // Whether to include the sender in the message.
259-
IsPersisted int `json:"isPersisted"` // Whether the message is persisted.
260-
MaxMember int `json:"maxMember"` // The maximum number of members in the group.
261-
PushExt string `json:"pushExt"` // The push extension.
252+
BindNotifyMsg bool `json:"bindNotifyMsg"` // Whether to bind the notification message and not deliver the corresponding message.
253+
FromUserId string `json:"fromUserId"` // The user ID of the message sender.
254+
ObjectName string `json:"objectName"` // The name of the message object.
255+
Content string `json:"content"` // The content of the message.
256+
PushContent string `json:"pushContent"` // The content of the push message.
257+
PushData string `json:"pushData"` // The data of the push message.
258+
IsIncludeSender int `json:"isIncludeSender"` // Whether to include the sender in the message.
259+
IsPersisted int `json:"isPersisted"` // Whether the message is persisted.
260+
MaxMember int `json:"maxMember"` // The maximum number of members in the group.
261+
PushExt string `json:"pushExt"` // The push extension.
262+
DisableUpdateLastMsg bool `json:"disableUpdateLastMsg"` // Indicates whether to disable updating the last message. Default is false.
262263
}
263264

264265
// OperationGroupResult represents the result of a group operation
@@ -284,6 +285,9 @@ func (rc *RongCloud) setMessageOptions(req *httplib.BeegoHTTPRequest, msgOptions
284285
req.Param("isPersisted", strconv.Itoa(msgOptions.IsPersisted))
285286
req.Param("maxMember", strconv.Itoa(msgOptions.MaxMember))
286287
req.Param("pushExt", msgOptions.PushExt)
288+
if msgOptions.DisableUpdateLastMsg {
289+
req.Param("disableUpdateLastMsg", strconv.FormatBool(msgOptions.DisableUpdateLastMsg))
290+
}
287291
}
288292

289293
// validateMessageOptions validates the message options parameters

0 commit comments

Comments
 (0)