declare identity to ease debug
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc 2024-03-29 16:42:03 +01:00
parent ce479cc5b9
commit 0b8e3c4c90

View File

@ -114,6 +114,7 @@ func ReadMessage(messageFilename string, detachFilesStoragePath string) ([]strin
messagesOverview := []string{} messagesOverview := []string{}
filenames := []string{} filenames := []string{}
identity := client.GetConfig().GetIdentity()
// read message file // read message file
msg, err := os.ReadFile(messageFilename) msg, err := os.ReadFile(messageFilename)
if err != nil { if err != nil {
@ -134,7 +135,7 @@ func ReadMessage(messageFilename string, detachFilesStoragePath string) ([]strin
for _, packedUserMessage := range fromServerMessage.Chat { for _, packedUserMessage := range fromServerMessage.Chat {
// find the peer with that lookup key // find the peer with that lookup key
peer := client.GetConfig().GetIdentity().Peers.GetFromMyLookupKey(packedUserMessage.Destination) peer := identity.Peers.GetFromMyLookupKey(packedUserMessage.Destination)
if peer == nil { if peer == nil {
return nil, nil, "ReadMessage: GetFromMyLookupKey", errors.New("no visible peer for that message") return nil, nil, "ReadMessage: GetFromMyLookupKey", errors.New("no visible peer for that message")
} }