storage start and identity in shared config
This commit is contained in:
@ -30,8 +30,10 @@ type Config struct {
|
||||
GroupChatNotifiactions bool `json:"group_chat_notifiactions,omitempty"`
|
||||
ChannelNotifications bool `json:"channel_notifications,omitempty"`
|
||||
// Inner
|
||||
memoryPassword string
|
||||
identityFile string
|
||||
memoryPassword string
|
||||
additionalPasswords []string
|
||||
identityFile string
|
||||
me *Identity
|
||||
}
|
||||
|
||||
var instance *Config
|
||||
@ -75,3 +77,11 @@ func (c *Config) SetMemPass(pass string) {
|
||||
func (c *Config) GetMemPass() string {
|
||||
return c.memoryPassword
|
||||
}
|
||||
|
||||
func (c *Config) SaveIdentity() error {
|
||||
return c.me.Save()
|
||||
}
|
||||
|
||||
func (c *Config) Clean() {
|
||||
c.additionalPasswords = []string{}
|
||||
}
|
||||
|
Reference in New Issue
Block a user