aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-03 23:16:05 +0800
committerobscuren <geffobscura@gmail.com>2015-02-03 23:16:05 +0800
commit7bd2fbe2b1445c26190008d21ad52dc5c364765c (patch)
tree88553917d6be4a51f4a9dd87f35ce31782319ee1 /cmd
parent623469cb6c6cdb6ff84dc2cb7d4409e9d7cf3f65 (diff)
downloaddexon-7bd2fbe2b1445c26190008d21ad52dc5c364765c.tar
dexon-7bd2fbe2b1445c26190008d21ad52dc5c364765c.tar.gz
dexon-7bd2fbe2b1445c26190008d21ad52dc5c364765c.tar.bz2
dexon-7bd2fbe2b1445c26190008d21ad52dc5c364765c.tar.lz
dexon-7bd2fbe2b1445c26190008d21ad52dc5c364765c.tar.xz
dexon-7bd2fbe2b1445c26190008d21ad52dc5c364765c.tar.zst
dexon-7bd2fbe2b1445c26190008d21ad52dc5c364765c.zip
Fixed whisper "to" filtering. Closes #283
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mist/assets/examples/whisper.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/mist/assets/examples/whisper.html b/cmd/mist/assets/examples/whisper.html
index 6a7143eef..ad568f783 100644
--- a/cmd/mist/assets/examples/whisper.html
+++ b/cmd/mist/assets/examples/whisper.html
@@ -10,6 +10,7 @@
<h1>Whisper test</h1>
<button onclick="test()">Send</button>
+<button onclick="test2()">Private send</button>
<table width="100%" id="table">
<tr>
@@ -44,10 +45,19 @@
document.querySelector("#table").innerHTML += "<tr><td colspan='2'>"+JSON.stringify(message)+"</td></tr>";
});
+ var selfWatch = shh.watch({to: id, topics: ["test"]})
+ selfWatch.arrived(function(message) {
+ document.querySelector("#table").innerHTML += "<tr><td>To me</td><td>"+JSON.stringify(message)+"</td></tr>";
+ });
+
function test() {
shh.post({topics: ["test"], payload: web3.fromAscii("test it")});
count();
+ }
+ function test2() {
+ shh.post({to: id, topics: ["test"], payload: web3.fromAscii("Private")});
+ count();
}
function count() {