get conversations keys for all peers v0

This commit is contained in:
ycc 2022-12-16 22:10:55 +01:00
parent 650782673d
commit 63fd7096d1

View File

@ -59,6 +59,17 @@ func (pl *PeerList) GetFromName(name string) *Peer {
return nil return nil
} }
func (pl *PeerList) GetConverstaionRequests(name string) []meowlib.ToServerMessage_ConversationRequest {
var list []meowlib.ToServerMessage_ConversationRequest
for _, peer := range *pl {
var cr meowlib.ToServerMessage_ConversationRequest
cr.LookupKey = peer.MyLookupKp.Public
// TODO Add key signature
list = append(list, cr)
}
return list
}
func (p *Peer) BuildSimpleUserMessage(message []byte) (*meowlib.UserMessage, error) { func (p *Peer) BuildSimpleUserMessage(message []byte) (*meowlib.UserMessage, error) {
var msg meowlib.UserMessage var msg meowlib.UserMessage
msg.From = p.MyIdentity.Public msg.From = p.MyIdentity.Public