From 63fd7096d1243043e1cfc90846142064752eb7b5 Mon Sep 17 00:00:00 2001 From: ycc Date: Fri, 16 Dec 2022 22:10:55 +0100 Subject: [PATCH] get conversations keys for all peers v0 --- client/peer.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/peer.go b/client/peer.go index 3a5e660..9286f8f 100644 --- a/client/peer.go +++ b/client/peer.go @@ -59,6 +59,17 @@ func (pl *PeerList) GetFromName(name string) *Peer { 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) { var msg meowlib.UserMessage msg.From = p.MyIdentity.Public