forked from cory/tildefriends
Immediately forward any non-post messages to the browser. The thought was to let votes through right away, because there's no harm, and I wanted to see what else makes sense.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3759 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
0bcc7d8c59
commit
5e0304481b
@ -1 +1 @@
|
|||||||
{"type":"tildefriends-app","files":{"app.js":"&chjdt5GtpAo/mI5TNU4n5erT2easdEgJqVrJHz6HtlA=.sha256","index.html":"&/CE4CuVKI56h5tfAHF0kzCXbLfhVjWzsM8aZAB9HpEM=.sha256","vue-material.js":"&K5cdLqXYCENPak/TCINHQhyJhpS4G9DlZHGwoh/LF2g=.sha256","tf-user.js":"&DdJwZYEo7AqFyutYMvEjykoVXxdHVog0UXye6Sbo0TU=.sha256","tf-message.js":"&gBMlL/D2sGuvFQR46qXM1ERLA+baZDp9h/4jOD42k7w=.sha256","tf.js":"&gJUMwBsssB+Suy/NTUjcB3JeloFLvV18i6egqvThaVY=.sha256","commonmark.min.js":"&5x6ek3tFrKTZX6hXNNyFsjmhvrjmWpUkwuuaiyVV1Us=.sha256","vue.js":"&g1wvA+yHl1sVC+eufTsg9If7ZeVyMTBU+h0tks7ZNzE=.sha256","vue-material-theme-default-dark.css":"&RP2nr+2CR18BpHHw5ST9a5GJUCOG9n0G2kuGkcQioWE=.sha256","vue-material.min.css":"&kGbUM2QgFSyHZRzqQb0b+0S3EVIlZ0AXpdiAVjIhou8=.sha256","roboto.css":"&jJv43Om673mQO5JK0jj7714s5E+5Yrf82H6LcDx7wUs=.sha256","material-icons.css":"&a28PdcVvgq/DxyIvJAx/e+ZOEtOuHnr3kjLWKyzH11M=.sha256"}}
|
{"type":"tildefriends-app","files":{"app.js":"&LAPhIEnIVpfzC4R5D93GtAPrKgViVV3wbHHzfa7tAr4=.sha256","index.html":"&/CE4CuVKI56h5tfAHF0kzCXbLfhVjWzsM8aZAB9HpEM=.sha256","vue-material.js":"&K5cdLqXYCENPak/TCINHQhyJhpS4G9DlZHGwoh/LF2g=.sha256","tf-user.js":"&DdJwZYEo7AqFyutYMvEjykoVXxdHVog0UXye6Sbo0TU=.sha256","tf-message.js":"&gBMlL/D2sGuvFQR46qXM1ERLA+baZDp9h/4jOD42k7w=.sha256","tf.js":"&gJUMwBsssB+Suy/NTUjcB3JeloFLvV18i6egqvThaVY=.sha256","commonmark.min.js":"&5x6ek3tFrKTZX6hXNNyFsjmhvrjmWpUkwuuaiyVV1Us=.sha256","vue.js":"&g1wvA+yHl1sVC+eufTsg9If7ZeVyMTBU+h0tks7ZNzE=.sha256","vue-material-theme-default-dark.css":"&RP2nr+2CR18BpHHw5ST9a5GJUCOG9n0G2kuGkcQioWE=.sha256","vue-material.min.css":"&kGbUM2QgFSyHZRzqQb0b+0S3EVIlZ0AXpdiAVjIhou8=.sha256","roboto.css":"&jJv43Om673mQO5JK0jj7714s5E+5Yrf82H6LcDx7wUs=.sha256","material-icons.css":"&a28PdcVvgq/DxyIvJAx/e+ZOEtOuHnr3kjLWKyzH11M=.sha256"}}
|
@ -363,7 +363,8 @@ ssb.addEventListener('message', async function(id) {
|
|||||||
var db = await database("ssb");
|
var db = await database("ssb");
|
||||||
var posts = await getPosts(db, [id]);
|
var posts = await getPosts(db, [id]);
|
||||||
for (let post of posts) {
|
for (let post of posts) {
|
||||||
if (post.author == await ssb.whoami()) {
|
if (post.author == await ssb.whoami() ||
|
||||||
|
JSON.parse(post.content).type != 'post') {
|
||||||
await app.postMessage({message: post});
|
await app.postMessage({message: post});
|
||||||
} else {
|
} else {
|
||||||
await app.postMessage({unread: 1});
|
await app.postMessage({unread: 1});
|
||||||
|
Loading…
Reference in New Issue
Block a user