diff options
Diffstat (limited to 'whisper/message.go')
-rw-r--r-- | whisper/message.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/whisper/message.go b/whisper/message.go index 457cf6def..ad31aa592 100644 --- a/whisper/message.go +++ b/whisper/message.go @@ -75,8 +75,13 @@ func (self *Message) Wrap(pow time.Duration, options Options) (*Envelope, error) return nil, err } } + // Convert the user topic into whisper ones + topics := make([]Topic, len(options.Topics)) + for i, topic := range options.Topics { + topics[i] = NewTopic(topic) + } // Wrap the processed message, seal it and return - envelope := NewEnvelope(options.TTL, options.Topics, self) + envelope := NewEnvelope(options.TTL, topics, self) envelope.Seal(pow) return envelope, nil |