diff --git a/bridge/src/discord/events.ts b/bridge/src/discord/events.ts index 765be37..fb67b02 100644 --- a/bridge/src/discord/events.ts +++ b/bridge/src/discord/events.ts @@ -122,6 +122,8 @@ client.on("messageCreate", async (message) => { return logger.debug(`Discord: No Revolt channel associated`); if (message.system && bridgeCfg.config?.disable_system_messages) return logger.debug(`Discord: Not bridging system message`); + if (bridgeCfg.config?.read_only_discord) + return logger.debug(`Discord: Channel is marked as read only`); const channel = revoltClient.channels.get(bridgeCfg.revolt); if (!channel) diff --git a/bridge/src/revolt/events.ts b/bridge/src/revolt/events.ts index bcbb98a..f8c23e2 100644 --- a/bridge/src/revolt/events.ts +++ b/bridge/src/revolt/events.ts @@ -151,6 +151,8 @@ client.on("message", async (message) => { return logger.debug( `Revolt: System message bridging disabled; ignoring` ); + if (bridgeCfg?.config?.read_only_revolt) + return logger.debug(`Revolt: Channel is marked as read only`); if (!bridgeCfg?.discord) return logger.debug(`Revolt: No Discord channel associated`); if (!bridgeCfg.discordWebhook) { diff --git a/lib/src/misc/bridge_config_keys.ts b/lib/src/misc/bridge_config_keys.ts index 3a77910..e30e0be 100644 --- a/lib/src/misc/bridge_config_keys.ts +++ b/lib/src/misc/bridge_config_keys.ts @@ -15,4 +15,12 @@ export const CONFIG_KEYS = { description: "If enabled, system messages (e.g. join/leave events) won't be bridged.", }, + read_only_revolt: { + friendlyName: "Revolt read only", + description: "Don't bridge Revolt messages to Discord", + }, + read_only_discord: { + friendlyName: "Discord read only", + description: "Don't bridge Discord messages to Revolt", + }, };