Skip to content

Commit a1f2d52

Browse files
committed
fix: 预留厂商配置
1 parent 77b6ad7 commit a1f2d52

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

config/types.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,12 @@ type huawei struct {
153153
}
154154

155155
type vendors struct {
156-
ChannelActivity string `mapstructure:"channel_activity"`
157-
XiaoMiChannelID string `mapstructure:"xiaomi_channel_id"`
158-
VivoCategory string `mapstructure:"vivo_category"`
159-
Oppo oppo `mapstructure:"oppo"`
160-
Huawei huawei `mapstructure:"huawei"`
156+
ChannelActivity string `mapstructure:"channel_activity"`
157+
XiaoMiChannelID string `mapstructure:"xiaomi_channel_id"`
158+
VivoCategory string `mapstructure:"vivo_category"`
159+
Oppo oppo `mapstructure:"oppo"`
160+
Huawei huawei `mapstructure:"huawei"`
161+
HonorChannelImportance string `mapstructure:"honor_channel_importance"`
161162
}
162163

163164
type mcp struct {

pkg/umeng/groupcast.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ func getChannelProperties() AndroidChannelProperties {
4242
// OppoNotifyLevel: config.Vendors.Oppo.NotifyLevel,
4343
HuaweiChannelImportance: config.Vendors.Huawei.ChannelImportance,
4444
// HuaweiChannelCategory: config.Vendors.Huawei.ChannelCategory,
45+
// HonorChannelImportance: config.Vendors.Honor.ChannelImportance,
4546
}
4647
}
4748

@@ -133,6 +134,8 @@ func SendIOSGroupcast(title, subtitle, body, tag string) error {
133134
Subtitle: subtitle,
134135
Body: body,
135136
},
137+
Sound: "default",
138+
InterruptionLevel: "active",
136139
},
137140
},
138141
Policy: IOSPolicy{

pkg/umeng/model.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ type AndroidChannelProperties struct {
6363
// OppoNotifyLevel string `json:"oppo_notify_id"`
6464
HuaweiChannelImportance string `json:"huawei_channel_importance"`
6565
// HuaweiChannelCategory string `json:"huawei_channel_category"`
66+
// HonorChannelImportance string `json:"honor_channel_importance"`
6667
// OppoPrivateMsgTemplate OppoPrivateMsgTemplate `json:"oppo_private_msg_template"`
6768
}
6869

@@ -88,7 +89,9 @@ type IOSPayload struct {
8889
}
8990

9091
type IOSAps struct {
91-
Alert IOSAlert `json:"alert"`
92+
Alert IOSAlert `json:"alert"`
93+
Sound string `json:"sound"`
94+
InterruptionLevel string `json:"interruption-level"`
9295
}
9396

9497
type IOSAlert struct {

0 commit comments

Comments
 (0)