mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: add PRIV_SEND_MESSAGE
This commit is contained in:
1 parent
be2b1c5524
commit
01d6d48c74
5 files changed
+12
-3
No files matched your search
@@ -372,6 +372,7 @@ class HomeMessagesHandler extends Handler {
|
||||
@param('uid', Types.Int)
|
||||
@param('content', Types.Content)
|
||||
async postSend(domainId: string, uid: number, content: string) {
|
||||
this.checkPriv(PRIV.PRIV_SEND_MESSAGE);
|
||||
const udoc = await user.getById('system', uid);
|
||||
if (!udoc) throw new UserNotFoundError(uid);
|
||||
if (udoc.avatar) udoc.avatarUrl = avatar(udoc.avatar);
|
||||
|
||||
Reference in new issue
Block a user