mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: support mention notification
This commit is contained in:
1 parent
d66c161e66
commit
ca00dda575
14 files changed
+67
-24
No files matched your search
@@ -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[]> {
|
||||
|
||||
Reference in new issue
Block a user