添加addon-ts.md,添加defaultUdoc

This commit is contained in:
undefined committed 2020-09-09 22:39:38 +08:00
1 parent 8b956575ee
commit d458c231a4
5 files changed
+230 -23

No files matched your search

+2 -1
View File
@@ -304,10 +304,11 @@ class HomeMessagesHandler extends Handler {
async get() {
// TODO(iceboy): projection, pagination.
const messages = await message.getByUser(this.user._id);
const udict = await user.getList('system', [
const uids = new Set<number>([
...messages.map((mdoc) => mdoc.from),
...messages.map((mdoc) => mdoc.to),
]);
const udict = await user.getList('system', Array.from(uids));
// TODO(twd2): improve here:
const parsed = {};
for (const m of messages) {