summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/WebhookService.ts
diff options
context:
space:
mode:
authorMarie <marie@kaifa.ch>2024-01-22 19:58:43 +0100
committerMarie <marie@kaifa.ch>2024-01-22 19:58:43 +0100
commitfd69a2fbbdd6c0f9f1a77da8d8ed8b4e6a96bfa2 (patch)
tree4b33fbfff4fd7692eacd9ca93744fb7568604dd5 /packages/backend/src/core/WebhookService.ts
parentchore: rename "Misskey Games" to "Games" (diff)
parentfix of #13014 (misskey-js publish) (diff)
downloadsharkey-fd69a2fbbdd6c0f9f1a77da8d8ed8b4e6a96bfa2.tar.gz
sharkey-fd69a2fbbdd6c0f9f1a77da8d8ed8b4e6a96bfa2.tar.bz2
sharkey-fd69a2fbbdd6c0f9f1a77da8d8ed8b4e6a96bfa2.zip
merge: upstream
Diffstat (limited to 'packages/backend/src/core/WebhookService.ts')
-rw-r--r--packages/backend/src/core/WebhookService.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/backend/src/core/WebhookService.ts b/packages/backend/src/core/WebhookService.ts
index 930e6ef64a..5937bf89b1 100644
--- a/packages/backend/src/core/WebhookService.ts
+++ b/packages/backend/src/core/WebhookService.ts
@@ -49,9 +49,10 @@ export class WebhookService implements OnApplicationShutdown {
switch (type) {
case 'webhookCreated':
if (body.active) {
- this.webhooks.push({
+ this.webhooks.push({ // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい
...body,
latestSentAt: body.latestSentAt ? new Date(body.latestSentAt) : null,
+ user: null, // joinなカラムは通常取ってこないので
});
}
break;
@@ -59,14 +60,16 @@ export class WebhookService implements OnApplicationShutdown {
if (body.active) {
const i = this.webhooks.findIndex(a => a.id === body.id);
if (i > -1) {
- this.webhooks[i] = {
+ this.webhooks[i] = { // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい
...body,
latestSentAt: body.latestSentAt ? new Date(body.latestSentAt) : null,
+ user: null, // joinなカラムは通常取ってこないので
};
} else {
- this.webhooks.push({
+ this.webhooks.push({ // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい
...body,
latestSentAt: body.latestSentAt ? new Date(body.latestSentAt) : null,
+ user: null, // joinなカラムは通常取ってこないので
});
}
} else {