Skip to content
Extraits de code Groupes Projets
Valider e9636920 rédigé par Will Hunt's avatar Will Hunt Validation de GitHub
Parcourir les fichiers

Merge pull request #50 from anoadragon453/delete-optional

Add config option to disable message deletion forwarding
parents 3346374b 2b4a07fc
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -5,6 +5,7 @@ bridge:
disablePresence: false
disableTypingNotifications: false
disableDiscordMentions: false
disableDeletionForwarding: false
auth:
clientID: "12345" # Get from discord
secret: "blah"
......
......@@ -18,6 +18,8 @@ properties:
type: "boolean"
disableDiscordMentions:
type: "boolean"
disableDeletionForwarding:
type: "boolean"
auth:
type: "object"
required: ["botToken"]
......
......@@ -242,6 +242,9 @@ export class DiscordBot {
}
public async ProcessMatrixRedact(event: any) {
if (this.config.bridge.disableDeletionForwarding) {
return;
}
log.info("DiscordBot", `Got redact request for ${event.redacts}`);
log.verbose("DiscordBot", `Event:`, event);
const storeEvent = await this.store.Get(DbEvent, {matrix_id: event.redacts + ";" + event.room_id});
......
......@@ -15,6 +15,7 @@ class DiscordBridgeConfigBridge {
public disablePresence: boolean;
public disableTypingNotifications: boolean;
public disableDiscordMentions: boolean;
public disableDeletionForwarding: boolean;
}
class DiscordBridgeConfigDatabase {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter