diff --git a/client/peer.go b/client/peer.go index c3e83a9..28387d9 100644 --- a/client/peer.go +++ b/client/peer.go @@ -81,6 +81,7 @@ func (pl *PeerList) GetConversationRequests() []*meowlib.ToServerMessage_Convers func (p *Peer) BuildSimpleUserMessage(message []byte) (*meowlib.UserMessage, error) { var msg meowlib.UserMessage + msg.Destination = p.Contact.LookupPublicKey msg.From = p.MyIdentity.Public msg.Data = message msg.Type = "1" @@ -118,6 +119,7 @@ func (p *Peer) BuildFileMessage(filename string, message []byte) ([]meowlib.User break } var msg meowlib.UserMessage + msg.Destination = p.Contact.LookupPublicKey msg.From = p.MyIdentity.Public msg.File.Filename = fi.Name() msg.File.Chunk = uint32(chunk) diff --git a/messages.pb.go b/messages.pb.go index 4981765..2cb14b0 100644 --- a/messages.pb.go +++ b/messages.pb.go @@ -547,8 +547,8 @@ type UserMessage struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` - From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` + Destination string `protobuf:"bytes,1,opt,name=destination,proto3" json:"destination,omitempty"` // Lookupkey + From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` // My public key for that contact Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` Status *UserMessage_ConversationStatus `protobuf:"bytes,5,opt,name=Status,proto3" json:"Status,omitempty"` diff --git a/pb/messages.proto b/pb/messages.proto index 3bbc2ce..6787fd6 100644 --- a/pb/messages.proto +++ b/pb/messages.proto @@ -85,8 +85,8 @@ message PackedUserMessage { // structure defining information that might be exchanged between two peers. message UserMessage { - string destination = 1; - string from = 2; + string destination = 1; // Lookupkey + string from = 2; // My public key for that contact string type = 3; bytes data = 4; message ConversationStatus {