diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-04-13 17:16:51 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-04-13 17:16:51 +0800 |
commit | 9a53390f49b9667db162bf2ef487d0af64b3363d (patch) | |
tree | b71d2daee37a56a7872d5d3c1536ed83a39d7bc2 /whisper/message.go | |
parent | 7b501906db5b4bed0cf9972a1b103cc343d7f2d2 (diff) | |
download | go-tangerine-9a53390f49b9667db162bf2ef487d0af64b3363d.tar.gz go-tangerine-9a53390f49b9667db162bf2ef487d0af64b3363d.tar.zst go-tangerine-9a53390f49b9667db162bf2ef487d0af64b3363d.zip |
whisper: clean up and integrate topics
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 |