Simplify sendUser.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3731 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2022-01-03 01:30:53 +00:00
parent df5dfa1539
commit e1448a1c3a
2 changed files with 9 additions and 15 deletions

View File

@ -1 +1 @@
{"type":"tildefriends-app","files":{"app.js":"&M2cicx5n1kGmenEYnNXakB4Hc7N5UZXsnJheE7hvKLc=.sha256","index.html":"&dyJyLJJqx+qcGXY9CYLY6Jxj/T/ZK+Z8ARa8MhLVhJI=.sha256","vue-material.js":"&K5cdLqXYCENPak/TCINHQhyJhpS4G9DlZHGwoh/LF2g=.sha256","tf-user.js":"&EuejzX/iNHsGkscTHJHeJ8YXukGb31KE8YGUMonXJB0=.sha256","tf-message.js":"&oQggZN26PtRi4Ce9HY8TKVJ9jRrYWLRE5tN+3yHwEJE=.sha256","tf.js":"&xNEPeISBMcsMcE7o1XFrj5JT5z+UMEGPajLQYZYfh2k=.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":"&kDS3+lAYQ3lTn9BExKQnXooSEb8AEFKv0r3ioKx6N7Y=.sha256","index.html":"&dyJyLJJqx+qcGXY9CYLY6Jxj/T/ZK+Z8ARa8MhLVhJI=.sha256","vue-material.js":"&K5cdLqXYCENPak/TCINHQhyJhpS4G9DlZHGwoh/LF2g=.sha256","tf-user.js":"&EuejzX/iNHsGkscTHJHeJ8YXukGb31KE8YGUMonXJB0=.sha256","tf-message.js":"&oQggZN26PtRi4Ce9HY8TKVJ9jRrYWLRE5tN+3yHwEJE=.sha256","tf.js":"&xNEPeISBMcsMcE7o1XFrj5JT5z+UMEGPajLQYZYfh2k=.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"}}

View File

@ -81,17 +81,6 @@ async function followers(db, id) {
return results;
}
async function sendUser(db, id) {
return Promise.all([
following(db, id).then(async function(following) {
return app.postMessage({following: {id: id, users: following}});
}),
followers(db, id).then(async function(followers) {
return app.postMessage({followers: {id: id, users: followers}});
}),
]);
}
async function getAbout(db, id) {
var o = await db.get(id + ":about");
const k_version = 4;
@ -284,7 +273,7 @@ async function refresh() {
}).then(function(posts) {
return Promise.all(posts.map(x => app.postMessage({message: x})));
}).then(function() {
return f.map(function(id) {
return Promise.all(f.map(function(id) {
return Promise.all([
getVotes(db, id).then(function(votes) {
return app.postMessage({votes: votes});
@ -292,9 +281,14 @@ async function refresh() {
getAbout(db, id).then(function(user) {
return app.postMessage({user: {user: id, about: user}});
}),
sendUser(db, id),
following(db, id).then(function(following) {
return app.postMessage({following: {id: id, users: following}});
}),
followers(db, id).then(function(followers) {
return app.postMessage({followers: {id: id, users: followers}});
}),
]);
});
}));
});
}),
]);