summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/web/ClientServerService.ts
diff options
context:
space:
mode:
authorMarie <Marie@kaifa.ch>2023-12-22 13:10:21 +0100
committerMarie <Marie@kaifa.ch>2023-12-22 13:10:21 +0100
commite0155cffae64e5a4d57676c802bcf97c509adf34 (patch)
treeef7f68a772984d9d04603eb9c0aa2967dd896a3b /packages/backend/src/server/web/ClientServerService.ts
parentfix: change way url example gets displayed on page editor (diff)
downloadsharkey-e0155cffae64e5a4d57676c802bcf97c509adf34.tar.gz
sharkey-e0155cffae64e5a4d57676c802bcf97c509adf34.tar.bz2
sharkey-e0155cffae64e5a4d57676c802bcf97c509adf34.zip
add: Custom MOTDs
This works almost exactly like FF's custom MOTDs with the only difference being that they get defined in the config file for performance reasons. Closes #86
Diffstat (limited to 'packages/backend/src/server/web/ClientServerService.ts')
-rw-r--r--packages/backend/src/server/web/ClientServerService.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts
index ea7bfd70b8..aa696046ea 100644
--- a/packages/backend/src/server/web/ClientServerService.ts
+++ b/packages/backend/src/server/web/ClientServerService.ts
@@ -178,6 +178,7 @@ export class ClientServerService {
infoImageUrl: meta.infoImageUrl ?? 'https://launcher.moe/nothinghere.png',
notFoundImageUrl: meta.notFoundImageUrl ?? 'https://launcher.moe/missingpage.webp',
instanceUrl: this.config.url,
+ randomMOTD: this.config.customMOTD ? this.config.customMOTD[Math.floor(Math.random() * this.config.customMOTD.length)] : undefined,
};
}