From 7d6d8dd913b9e450dd4435f796f12bc49b2a48d9 Mon Sep 17 00:00:00 2001 From: ycc Date: Sat, 17 Dec 2022 21:37:48 +0100 Subject: [PATCH] bugfix in serialization of incoming messages in redis --- pb/messages.proto | 1 - server/router.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pb/messages.proto b/pb/messages.proto index 6787fd6..40d4d28 100644 --- a/pb/messages.proto +++ b/pb/messages.proto @@ -76,7 +76,6 @@ message ContactCard { // structure for sending a message to be forwarded to another user in protobuf format message PackedUserMessage { - //string from = 1; // the client identity public key as known by the destination peer // remove, limit server tracking string destination=1; // the peer's current conversation lookup public key bytes payload=2; // the message UserMessage encrypted with the destination peer's public key bytes signature=3; // the payload signature with the client identity private key diff --git a/server/router.go b/server/router.go index 7808a8a..a6e2271 100644 --- a/server/router.go +++ b/server/router.go @@ -34,7 +34,7 @@ func (r *RedisRouter) Route(msg *meowlib.ToServerMessage) (*meowlib.FromServerMe if len(msg.Messages) > 0 { // user message for _, usrmsg := range msg.Messages { // serialize the message to store it as byte array into redis - out, err := proto.Marshal(msg) + out, err := proto.Marshal(usrmsg) if err != nil { return nil, err }