aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/qwhisper/whisper.go
diff options
context:
space:
mode:
Diffstat (limited to 'ui/qt/qwhisper/whisper.go')
-rw-r--r--ui/qt/qwhisper/whisper.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/ui/qt/qwhisper/whisper.go b/ui/qt/qwhisper/whisper.go
index becb2a29b..b904678f4 100644
--- a/ui/qt/qwhisper/whisper.go
+++ b/ui/qt/qwhisper/whisper.go
@@ -43,7 +43,7 @@ func (self *Whisper) Post(payload []string, to, from string, topics []string, pr
msg := whisper.NewMessage(data)
envelope, err := msg.Seal(time.Duration(priority*100000), whisper.Opts{
- Ttl: time.Duration(ttl),
+ Ttl: time.Duration(ttl) * time.Second,
To: crypto.ToECDSAPub(fromHex(to)),
From: crypto.ToECDSA(fromHex(from)),
Topics: whisper.TopicsFromString(topics...),
@@ -84,8 +84,14 @@ func (self *Whisper) Watch(opts map[string]interface{}, view *qml.Common) int {
return i
}
-func (self *Whisper) Trigger(id int) {
- go self.Whisper.Trigger(id)
+func (self *Whisper) Messages(id int) (messages *ethutil.List) {
+ msgs := self.Whisper.Messages(id)
+ messages = ethutil.EmptyList()
+ for _, message := range msgs {
+ messages.Append(ToQMessage(message))
+ }
+
+ return
}
func filterFromMap(opts map[string]interface{}) (f whisper.Filter) {