core: support mention notification

This commit is contained in:
undefined committed 2021-09-20 22:42:24 +08:00
1 parent d66c161e66
commit ca00dda575
14 files changed
+67 -24

No files matched your search

+2 -1
View File
@@ -10,6 +10,7 @@ const coll = db.collection('message');
class MessageModel {
static FLAG_UNREAD = 1;
static FLAG_ALERT = 2;
static FLAG_RICHTEXT = 4;
@ArgMethod
static async send(
@@ -33,7 +34,7 @@ class MessageModel {
@ArgMethod
static async getByUser(uid: number): Promise<MessageDoc[]> {
return await coll.find({ $or: [{ from: uid }, { to: uid }] }).sort('_id', 1).toArray();
return await coll.find({ $or: [{ from: uid }, { to: uid }] }).sort('_id', 1).limit(1000).toArray();
}
static async getMany(query: FilterQuery<MessageDoc>, sort: any, page: number, limit: number): Promise<MessageDoc[]> {