mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
getui update
This commit is contained in:
parent
1b31a07b40
commit
baece7eb3a
@ -236,6 +236,13 @@ push:
|
||||
enable: # true or false (bool)
|
||||
channelID: ""
|
||||
channelName: ""
|
||||
channel:
|
||||
HW:
|
||||
category:
|
||||
XM:
|
||||
channelID:
|
||||
OPPO:
|
||||
channelID:
|
||||
fcm: #firebase cloud message 消息推送
|
||||
serviceAccount: #帐号文件,此处需要改修配置,并且这个文件放在 config目录下
|
||||
enable: false
|
||||
|
@ -117,18 +117,35 @@ type Notification struct {
|
||||
}
|
||||
|
||||
type Options struct {
|
||||
HW struct {
|
||||
DefaultSound bool `json:"/message/android/notification/default_sound"`
|
||||
ChannelID string `json:"/message/android/notification/channel_id"`
|
||||
Sound string `json:"/message/android/notification/sound"`
|
||||
Importance string `json:"/message/android/notification/importance"`
|
||||
} `json:"HW"`
|
||||
XM struct {
|
||||
ChannelID string `json:"/extra.channel_id"`
|
||||
} `json:"XM"`
|
||||
VV struct {
|
||||
Classification int `json:"/classification"`
|
||||
} `json:"VV"`
|
||||
HW *HW `json:"HW"`
|
||||
XM *XM `json:"XM"`
|
||||
VV *VV `json:"VV"`
|
||||
OP *OP `json:"OP"`
|
||||
HO *HO `json:"HO"`
|
||||
}
|
||||
|
||||
type HW struct {
|
||||
Category string `json:"/message/android/category"`
|
||||
DefaultSound bool `json:"/message/android/notification/default_sound"`
|
||||
ChannelID string `json:"/message/android/notification/channel_id"`
|
||||
Sound string `json:"/message/android/notification/sound"`
|
||||
Importance string `json:"/message/android/notification/importance"`
|
||||
}
|
||||
|
||||
type XM struct {
|
||||
ChannelID string `json:"/extra.channel_id"`
|
||||
}
|
||||
|
||||
type VV struct {
|
||||
Classification int `json:"/classification"`
|
||||
}
|
||||
|
||||
type OP struct {
|
||||
ChannelID string `json:"/channel_id"`
|
||||
}
|
||||
|
||||
type HO struct {
|
||||
Importance string `json:"/android/notification/importance"`
|
||||
}
|
||||
|
||||
type PushResp struct {
|
||||
@ -280,20 +297,11 @@ func (pushReq *PushReq) setPushChannel(title string, body string) {
|
||||
ClickType: "startapp",
|
||||
}
|
||||
pushReq.PushChannel.Android.Ups.Options = Options{
|
||||
HW: struct {
|
||||
DefaultSound bool `json:"/message/android/notification/default_sound"`
|
||||
ChannelID string `json:"/message/android/notification/channel_id"`
|
||||
Sound string `json:"/message/android/notification/sound"`
|
||||
Importance string `json:"/message/android/notification/importance"`
|
||||
}{ChannelID: "RingRing4", Sound: "/raw/ring001", Importance: "NORMAL"},
|
||||
XM: struct {
|
||||
ChannelID string `json:"/extra.channel_id"`
|
||||
}{ChannelID: "high_system"},
|
||||
VV: struct {
|
||||
Classification int "json:\"/classification\""
|
||||
}{
|
||||
Classification: 1,
|
||||
},
|
||||
HW: &HW{Category: config.Config.Push.Getui.Channel.HW.Category, ChannelID: "RingRing4", Sound: "/raw/ring001", Importance: "NORMAL"},
|
||||
HO: &HO{Importance: "NORMAL"},
|
||||
XM: &XM{ChannelID: config.Config.Push.Getui.Channel.XM.ChannelID},
|
||||
OP: &OP{ChannelID: config.Config.Push.Getui.Channel.OPPO.ChannelID},
|
||||
VV: &VV{Classification: 1},
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -210,6 +210,17 @@ type config struct {
|
||||
MasterSecret string `yaml:"masterSecret"`
|
||||
ChannelID string `yaml:"channelID"`
|
||||
ChannelName string `yaml:"channelName"`
|
||||
Channel struct {
|
||||
HW struct {
|
||||
Category string `yaml:"category"`
|
||||
} `yaml:"HW"`
|
||||
XM struct {
|
||||
ChannelID string `yaml:"channelID"`
|
||||
} `yaml:"XM"`
|
||||
OPPO struct {
|
||||
ChannelID string `yaml:"channelID"`
|
||||
} `yaml:"OPPO"`
|
||||
} `yaml:"channel"`
|
||||
}
|
||||
Fcm struct {
|
||||
ServiceAccount string `yaml:"serviceAccount"`
|
||||
|
Loading…
x
Reference in New Issue
Block a user