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") }