mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
center: add notification push support
This commit is contained in:
2 files changed
+3
-1
No files matched your search
@@ -63,6 +63,7 @@ class DataReportHandler extends Handler {
|
||||
sandbox: payload.sandbox,
|
||||
dbVersion: payload.dbVersion,
|
||||
};
|
||||
if (old.notification) setPayload.notification = '';
|
||||
if (old && lt(payload.version, old.version)) {
|
||||
await coll.updateOne(
|
||||
{ _id: installId },
|
||||
@@ -85,6 +86,7 @@ class DataReportHandler extends Handler {
|
||||
this.ctx.emit('center/report', this, installId, old, payload);
|
||||
// TODO deliver messages
|
||||
this.response.body = { code: 0 };
|
||||
if (old.notification) this.response.body.notification = old.notification;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user