From 0b8e3c4c90799707580612016bd55b20c766bf70 Mon Sep 17 00:00:00 2001 From: ycc Date: Fri, 29 Mar 2024 16:42:03 +0100 Subject: [PATCH] declare identity to ease debug --- client/helpers/backgroundHelper.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/helpers/backgroundHelper.go b/client/helpers/backgroundHelper.go index a6f1221..fd5c0e0 100644 --- a/client/helpers/backgroundHelper.go +++ b/client/helpers/backgroundHelper.go @@ -114,6 +114,7 @@ func ReadMessage(messageFilename string, detachFilesStoragePath string) ([]strin messagesOverview := []string{} filenames := []string{} + identity := client.GetConfig().GetIdentity() // read message file msg, err := os.ReadFile(messageFilename) if err != nil { @@ -134,7 +135,7 @@ func ReadMessage(messageFilename string, detachFilesStoragePath string) ([]strin for _, packedUserMessage := range fromServerMessage.Chat { // find the peer with that lookup key - peer := client.GetConfig().GetIdentity().Peers.GetFromMyLookupKey(packedUserMessage.Destination) + peer := identity.Peers.GetFromMyLookupKey(packedUserMessage.Destination) if peer == nil { return nil, nil, "ReadMessage: GetFromMyLookupKey", errors.New("no visible peer for that message") }