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:
@ -363,7 +363,8 @@ ssb.addEventListener('message', async function(id) {
|
||||
var db = await database("ssb");
|
||||
var posts = await getPosts(db, [id]);
|
||||
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});
|
||||
} else {
|
||||
await app.postMessage({unread: 1});
|
||||
|
Reference in New Issue
Block a user