good morning!!!!

Skip to content
Snippets Groups Projects
Commit 15586368 authored by Péter Szilágyi's avatar Péter Szilágyi
Browse files

whisper: fix spurious From identity with untargeted messages

parent 87447f9f
No related branches found
No related tags found
No related merge requests found
......@@ -260,9 +260,11 @@ func (self *Whisper) open(envelope *Envelope) *Message {
// Iterate over the keys and try to decrypt the message
for _, key := range self.keys {
message, err := envelope.Open(key)
if err == nil || err == ecies.ErrInvalidPublicKey {
if err == nil {
message.To = &key.PublicKey
return message
} else if err == ecies.ErrInvalidPublicKey {
return message
}
}
// Failed to decrypt, don't return anything
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment