Fixed whisper messages
* Whisper protocol wasn't properly suppling envelope slices * Message history wasn't properly propagated * Added 'Messages' method, filtering any current envelope with the supplied filter.
This commit is contained in:
@@ -67,7 +67,11 @@ func (self *Message) Seal(pow time.Duration, opts Opts) (*Envelope, error) {
|
||||
}
|
||||
}
|
||||
|
||||
envelope := NewEnvelope(DefaultTtl, opts.Topics, self)
|
||||
if opts.Ttl == 0 {
|
||||
opts.Ttl = DefaultTtl
|
||||
}
|
||||
|
||||
envelope := NewEnvelope(opts.Ttl, opts.Topics, self)
|
||||
envelope.Seal(pow)
|
||||
|
||||
return envelope, nil
|
||||
|
Reference in New Issue
Block a user