diff --git a/packages/backend/src/core/AntennaService.ts b/packages/backend/src/core/AntennaService.ts index 2c27a02559..2959153070 100644 --- a/packages/backend/src/core/AntennaService.ts +++ b/packages/backend/src/core/AntennaService.ts @@ -55,23 +55,29 @@ export class AntennaService implements OnApplicationShutdown { const { type, body } = obj.message as GlobalEvents['internal']['payload']; switch (type) { case 'antennaCreated': - this.antennas.push({ + this.antennas.push({ // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい ...body, lastUsedAt: new Date(body.lastUsedAt), + user: null, // joinなカラムは通常取ってこないので + userList: null, // joinなカラムは通常取ってこないので }); break; case 'antennaUpdated': { const idx = this.antennas.findIndex(a => a.id === body.id); if (idx >= 0) { - this.antennas[idx] = { + this.antennas[idx] = { // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい ...body, lastUsedAt: new Date(body.lastUsedAt), + user: null, // joinなカラムは通常取ってこないので + userList: null, // joinなカラムは通常取ってこないので }; } else { // サーバ起動時にactiveじゃなかった場合、リストに持っていないので追加する必要あり - this.antennas.push({ + this.antennas.push({ // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい ...body, lastUsedAt: new Date(body.lastUsedAt), + user: null, // joinなカラムは通常取ってこないので + userList: null, // joinなカラムは通常取ってこないので }); } } diff --git a/packages/backend/src/core/MetaService.ts b/packages/backend/src/core/MetaService.ts index 80e8020961..8e945e3d89 100644 --- a/packages/backend/src/core/MetaService.ts +++ b/packages/backend/src/core/MetaService.ts @@ -51,7 +51,10 @@ export class MetaService implements OnApplicationShutdown { const { type, body } = obj.message as GlobalEvents['internal']['payload']; switch (type) { case 'metaUpdated': { - this.cache = body; + this.cache = { // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい + ...body, + proxyAccount: null, // joinなカラムは通常取ってこないので + }; break; } default: diff --git a/packages/backend/src/core/RoleService.ts b/packages/backend/src/core/RoleService.ts index d354faa7c2..2c1a5280b8 100644 --- a/packages/backend/src/core/RoleService.ts +++ b/packages/backend/src/core/RoleService.ts @@ -177,9 +177,10 @@ export class RoleService implements OnApplicationShutdown, OnModuleInit { case 'userRoleAssigned': { const cached = this.roleAssignmentByUserIdCache.get(body.userId); if (cached) { - cached.push({ + cached.push({ // TODO: このあたりのデシリアライズ処理は各modelファイル内に関数としてexportしたい ...body, expiresAt: body.expiresAt ? new Date(body.expiresAt) : null, + user: null, // joinなカラムは通常取ってこないので }); } break; 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 {