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
This commit is contained in:
Marie 2023-12-22 13:10:21 +01:00
parent 8536e22cfe
commit e0155cffae
6 changed files with 27 additions and 1 deletions

View file

@ -85,6 +85,8 @@ type Source = {
proxyRemoteFiles?: boolean;
videoThumbnailGenerator?: string;
customMOTD?: string[];
signToActivityPubGet?: boolean;
perChannelMaxNoteCacheCount?: number;
@ -142,6 +144,7 @@ export type Config = {
deliverJobMaxAttempts: number | undefined;
inboxJobMaxAttempts: number | undefined;
proxyRemoteFiles: boolean | undefined;
customMOTD: string[] | undefined;
signToActivityPubGet: boolean | undefined;
version: string;
@ -248,6 +251,7 @@ export function loadConfig(): Config {
deliverJobMaxAttempts: config.deliverJobMaxAttempts,
inboxJobMaxAttempts: config.inboxJobMaxAttempts,
proxyRemoteFiles: config.proxyRemoteFiles,
customMOTD: config.customMOTD,
signToActivityPubGet: config.signToActivityPubGet,
mediaProxy: externalMediaProxy ?? internalMediaProxy,
externalMediaProxyEnabled: externalMediaProxy !== null && externalMediaProxy !== internalMediaProxy,