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

@ -31,7 +31,7 @@ type Peer struct {
OnionMode bool `json:"onion_mode,omitempty"`
LastMessage time.Time `json:"last_message,omitempty"`
DbIds []string `json:"db_ids,omitempty"`
DbPassword string `json:"db_password,omitempty"`
dbPassword string
}
type PeerList []Peer
@ -193,9 +193,9 @@ func (p *Peer) UnPackUserMessage(protoPackedMessage []byte) (payload []byte, sig
return msg.Payload, msg.Signature, nil
}
func (p *Peer) GetConversationRequest() meowlib.ToServerMessage_ConversationRequest {
func (p *Peer) GetConversationRequest() *meowlib.ToServerMessage_ConversationRequest {
var cr meowlib.ToServerMessage_ConversationRequest
return cr
return &cr
}
func (p *Peer) ProcessOutboundUserMessage(usermessage *meowlib.UserMessage) (*meowlib.PackedUserMessage, error) {
@ -226,6 +226,14 @@ func (p *Peer) ProcessInboundUserMessage(message []byte, signature []byte) (*meo
return msg, nil
}
func (p *Peer) SetDbPassword(password string) {
p.dbPassword = password
}
func (p *Peer) GetDbPassword() string {
return p.dbPassword
}
func (p *Peer) StoreMessage(msg []byte) {
}