Doc update

This commit is contained in:
ycc
2023-11-06 22:44:21 +01:00
parent cd41a59518
commit 08ff9d58b8
12 changed files with 855 additions and 732 deletions

View File

@ -71,10 +71,10 @@ func (pl *PeerList) GetFromName(name string) *Peer {
return nil
}
func (pl *PeerList) GetConversationRequests() []*meowlib.ToServerMessage_ConversationRequest {
var list []*meowlib.ToServerMessage_ConversationRequest
func (pl *PeerList) GetConversationRequests() []*meowlib.ConversationRequest {
var list []*meowlib.ConversationRequest
for _, peer := range *pl {
var cr meowlib.ToServerMessage_ConversationRequest
var cr meowlib.ConversationRequest
cr.LookupKey = peer.MyLookupKp.Public
// TODO Add key signature
list = append(list, &cr)
@ -88,7 +88,7 @@ func (p *Peer) BuildSimpleUserMessage(message []byte) (*meowlib.UserMessage, err
msg.From = p.MyIdentity.Public
msg.Data = message
msg.Type = "1"
msg.Status = &meowlib.UserMessage_ConversationStatus{}
msg.Status = &meowlib.ConversationStatus{}
msg.Status.LocalUuid = uuid.New().String()
return &msg, nil
}
@ -132,7 +132,7 @@ func (p *Peer) BuildSingleFileMessage(filename string, message []byte) ([]meowli
msg.Files = append(msg.Files, &file)
msg.Type = "2"
if chunk == 0 {
msg.Status = &meowlib.UserMessage_ConversationStatus{}
msg.Status = &meowlib.ConversationStatus{}
msg.Status.LocalUuid = uuid.New().String()
}
msgs = append(msgs, msg)
@ -196,8 +196,8 @@ func (p *Peer) UnPackUserMessage(protoPackedMessage []byte) (payload []byte, sig
return msg.Payload, msg.Signature, nil
}
func (p *Peer) GetConversationRequest() *meowlib.ToServerMessage_ConversationRequest {
var cr meowlib.ToServerMessage_ConversationRequest
func (p *Peer) GetConversationRequest() *meowlib.ConversationRequest {
var cr meowlib.ConversationRequest
return &cr
}