storage start and identity in shared config

This commit is contained in:
ycc
2023-01-07 00:39:05 +01:00
parent 52ae52ca9f
commit 5ac92ce3a8
7 changed files with 112 additions and 11 deletions

View File

@ -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{}
}