mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: 优化钩子逻辑
This commit is contained in:
1 parent
03dc8903e2
commit
f2f0212947
27 files changed
+205
-124
No files matched your search
@@ -22,7 +22,7 @@ export async function send(
|
||||
if (from !== to) {
|
||||
// ENHANCE domainId?
|
||||
const udoc = await user.getById('system', to);
|
||||
bus.publish(`user_message-${to}`, { mdoc, udoc });
|
||||
bus.boardcast('user/message', to, mdoc, udoc);
|
||||
}
|
||||
return mdoc;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ function ensureIndexes() {
|
||||
]);
|
||||
}
|
||||
|
||||
global.Hydro.postInit.push(ensureIndexes);
|
||||
bus.once('app/started', ensureIndexes);
|
||||
global.Hydro.model.message = {
|
||||
FLAG_UNREAD,
|
||||
FLAG_ALERT,
|
||||
|
||||
Reference in new issue
Block a user