diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index 8e4f198e8..5182de6d6 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -165,51 +165,21 @@ type config struct { } Notification struct { GroupCreated struct { - Conversation struct { - ConversationChanged bool `yaml:"conversationChanged"` - UnreadCount bool `yaml:"unreadCount"` - } - OfflinePush struct { - PushSwitch bool `yaml:"switch"` - Title string `yaml:"title"` - Desc string `yaml:"desc"` - Ext string `yaml:"ext"` - } - DefaultTips struct { - Tips string `yaml:"tips"` - } + conversation Conversation `yaml:"conversation"` + offlinePush OfflinePush `yaml:"offlinePush"` + defaultTips DefaultTips `yaml:"defaultTips"` } GroupInfoChanged struct { - Conversation struct { - ConversationChanged bool `yaml:"conversationChanged"` - UnreadCount bool `yaml:"unreadCount"` - } - OfflinePush struct { - PushSwitch bool `yaml:"switch"` - Title string `yaml:"title"` - Desc string `yaml:"desc"` - Ext string `yaml:"ext"` - } - DefaultTips struct { - Tips string `yaml:"tips"` - } + conversation Conversation `yaml:"conversation"` + offlinePush OfflinePush `yaml:"offlinePush"` + defaultTips DefaultTips `yaml:"defaultTips"` } ApplyJoinGroup struct { - Conversation struct { - ConversationChanged bool `yaml:"conversationChanged"` - UnreadCount bool `yaml:"unreadCount"` - } - OfflinePush struct { - PushSwitch bool `yaml:"switch"` - Title string `yaml:"title"` - Desc string `yaml:"desc"` - Ext string `yaml:"ext"` - } - DefaultTips struct { - Tips string `yaml:"tips"` - } + conversation Conversation `yaml:"conversation"` + offlinePush OfflinePush `yaml:"offlinePush"` + defaultTips DefaultTips `yaml:"defaultTips"` } } Demo struct { @@ -230,6 +200,20 @@ type config struct { } } } +type Conversation struct { + ConversationChanged bool `yaml:"conversationChanged"` + UnreadCount bool `yaml:"unreadCount"` +} + +type OfflinePush struct { + PushSwitch bool `yaml:"switch"` + Title string `yaml:"title"` + Desc string `yaml:"desc"` + Ext string `yaml:"ext"` +} +type DefaultTips struct { + Tips string `yaml:"tips"` +} func init() { //path, _ := os.Getwd()