aboutsummaryrefslogtreecommitdiffstats
path: root/whisper
diff options
context:
space:
mode:
authorgluk256 <gluk256@users.noreply.github.com>2018-03-03 16:40:01 +0800
committerGitHub <noreply@github.com>2018-03-03 16:40:01 +0800
commit66cd41af1e3827f9f834ca6ea98d6964d2388f77 (patch)
tree3474a30b89770b16335c1982ede77c00f8d0cdac /whisper
parentfa375955ad52bc7936f33c8d8cec68fb9007baaa (diff)
parent6219a338225f1a4dfb7e51212ec3dde6e32785ce (diff)
downloaddexon-66cd41af1e3827f9f834ca6ea98d6964d2388f77.tar
dexon-66cd41af1e3827f9f834ca6ea98d6964d2388f77.tar.gz
dexon-66cd41af1e3827f9f834ca6ea98d6964d2388f77.tar.bz2
dexon-66cd41af1e3827f9f834ca6ea98d6964d2388f77.tar.lz
dexon-66cd41af1e3827f9f834ca6ea98d6964d2388f77.tar.xz
dexon-66cd41af1e3827f9f834ca6ea98d6964d2388f77.tar.zst
dexon-66cd41af1e3827f9f834ca6ea98d6964d2388f77.zip
Merge pull request #16231 from gluk256/303-reader
whisper: filereader mode introduced to wnode
Diffstat (limited to 'whisper')
-rw-r--r--whisper/whisperv6/envelope.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/whisper/whisperv6/envelope.go b/whisper/whisperv6/envelope.go
index 2c80d47bc..2f947f1a4 100644
--- a/whisper/whisperv6/envelope.go
+++ b/whisper/whisperv6/envelope.go
@@ -208,6 +208,10 @@ func (e *Envelope) OpenSymmetric(key []byte) (msg *ReceivedMessage, err error) {
// Open tries to decrypt an envelope, and populates the message fields in case of success.
func (e *Envelope) Open(watcher *Filter) (msg *ReceivedMessage) {
+ if watcher == nil {
+ return nil
+ }
+
// The API interface forbids filters doing both symmetric and asymmetric encryption.
if watcher.expectsAsymmetricEncryption() && watcher.expectsSymmetricEncryption() {
return nil