mirror of
https://github.com/pockethost/pockethost.git
synced 2025-03-30 15:08:30 +00:00
fix: mothership notifications
This commit is contained in:
parent
d663500a19
commit
3400d9ce94
@ -1,5 +0,0 @@
|
||||
---
|
||||
'pockethost': minor
|
||||
---
|
||||
|
||||
Enh: Added custom instance idle TTL support
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
'pockethost': minor
|
||||
---
|
||||
|
||||
Added support for instances hosted on alternate volumes
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
'pockethost': minor
|
||||
---
|
||||
|
||||
Feature: cloud volume support for instances
|
@ -1,5 +1,17 @@
|
||||
# pockethost
|
||||
|
||||
## 2.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 2d2ce8c: Enh: Added custom instance idle TTL support
|
||||
- 26d1070: Added support for instances hosted on alternate volumes
|
||||
- eb9d8a4: Feature: cloud volume support for instances
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Fix: Mothership notifications where not being sent out
|
||||
|
||||
## 2.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pockethost",
|
||||
"version": "2.0.2",
|
||||
"version": "2.1.0",
|
||||
"author": {
|
||||
"name": "Ben Allfree",
|
||||
"url": "https://github.com/benallfree"
|
||||
|
@ -33,6 +33,7 @@ __export(lib_exports, {
|
||||
HandleMirrorData: () => HandleMirrorData,
|
||||
HandleNotifyDiscordAfterCreate: () => HandleNotifyDiscordAfterCreate,
|
||||
HandleNotifyMaintenanceMode: () => HandleNotifyMaintenanceMode,
|
||||
HandleProcessNotification: () => HandleProcessNotification,
|
||||
HandleProcessSingleNotification: () => HandleProcessSingleNotification,
|
||||
HandleSesError: () => HandleSesError,
|
||||
HandleSignupCheck: () => HandleSignupCheck,
|
||||
@ -786,6 +787,28 @@ var HandleProcessSingleNotification = (c) => {
|
||||
return c.json(200, { status: "ok" });
|
||||
};
|
||||
|
||||
// src/lib/handlers/notify/model/HandleProcessNotification.ts
|
||||
var HandleProcessNotification = (e) => {
|
||||
const dao = e.dao || $app.dao();
|
||||
const log = mkLog(`notification:sendImmediately`);
|
||||
const audit = mkAudit(log, dao);
|
||||
const processNotification = mkNotificationProcessor(log, dao, false);
|
||||
const notificationRec = e.model;
|
||||
log({ notificationRec });
|
||||
try {
|
||||
dao.expandRecord(notificationRec, ["message_template"]);
|
||||
const messageTemplateRec = notificationRec.expandedOne(`message_template`);
|
||||
if (!messageTemplateRec) {
|
||||
throw new Error(`Missing message template`);
|
||||
}
|
||||
processNotification(notificationRec);
|
||||
} catch (e2) {
|
||||
audit(`ERROR`, `${e2}`, {
|
||||
notification: notificationRec.getId()
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// src/lib/handlers/notify/model/HandleUserWelcomeMessage.ts
|
||||
var HandleUserWelcomeMessage = (e) => {
|
||||
const dao = e.dao || $app.dao();
|
||||
@ -3122,6 +3145,7 @@ var HandleVersionsRequest = (c) => {
|
||||
HandleMirrorData,
|
||||
HandleNotifyDiscordAfterCreate,
|
||||
HandleNotifyMaintenanceMode,
|
||||
HandleProcessNotification,
|
||||
HandleProcessSingleNotification,
|
||||
HandleSesError,
|
||||
HandleSignupCheck,
|
||||
|
@ -1,2 +1,3 @@
|
||||
export * from './api/HandleProcessSingleNotification'
|
||||
export * from './model/HandleProcessNotification'
|
||||
export * from './model/HandleUserWelcomeMessage'
|
||||
|
Loading…
x
Reference in New Issue
Block a user