mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
ac_msg fallback support
This commit is contained in:
1 parent
9428efb156
commit
5980080302
9 files changed
+51
-9
No files matched your search
@@ -336,6 +336,14 @@ class HomeMessagesHandler extends Handler {
|
||||
else throw new PermissionError();
|
||||
this.back();
|
||||
}
|
||||
|
||||
@param('messageId', Types.ObjectID)
|
||||
async postRead(domainId: string, messageId: ObjectID) {
|
||||
const msg = await message.get(messageId);
|
||||
if ([msg.from, msg.to].includes(this.user._id)) await message.setFlag(messageId, message.FLAG_UNREAD);
|
||||
else throw new PermissionError();
|
||||
this.back();
|
||||
}
|
||||
}
|
||||
|
||||
class HomeMessagesConnectionHandler extends ConnectionHandler {
|
||||
|
||||
Reference in new issue
Block a user