mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-03 08:35:59 +08:00
msg split
This commit is contained in:
+10
-4
@@ -25,6 +25,12 @@ func NewOptions(opts ...OptionsOpt) Options {
|
||||
return options
|
||||
}
|
||||
|
||||
func NewMsgOptions() Options {
|
||||
options := make(map[string]bool, 11)
|
||||
options[constant.IsOfflinePush] = false
|
||||
return make(map[string]bool)
|
||||
}
|
||||
|
||||
func WithOptions(options Options, opts ...OptionsOpt) Options {
|
||||
for _, opt := range opts {
|
||||
opt(options)
|
||||
@@ -56,15 +62,15 @@ func WithPersistent() OptionsOpt {
|
||||
}
|
||||
}
|
||||
|
||||
func WithOfflinePush() OptionsOpt {
|
||||
func WithOfflinePush(b bool) OptionsOpt {
|
||||
return func(options Options) {
|
||||
options[constant.IsOfflinePush] = true
|
||||
options[constant.IsOfflinePush] = b
|
||||
}
|
||||
}
|
||||
|
||||
func WithUnreadCount() OptionsOpt {
|
||||
func WithUnreadCount(b bool) OptionsOpt {
|
||||
return func(options Options) {
|
||||
options[constant.IsUnreadCount] = true
|
||||
options[constant.IsUnreadCount] = b
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user