bodge permission check so simple mod can link bridge :P
This commit is contained in:
parent
4e26f2df34
commit
848b0f3d5c
2 changed files with 19 additions and 0 deletions
|
@ -2,6 +2,12 @@
|
|||
root_host = "grimmauld.de";
|
||||
bridge_port = 9005; # netstat -nlp | grep 9005
|
||||
in {
|
||||
nixpkgs.overlays = [ (final: prev: { matrix-appservice-discord = prev.matrix-appservice-discord.overrideAttrs (old: {
|
||||
patches = (let oldPatches = old.patches or []; in if oldPatches == null then [] else oldPatches) ++ [ ./patch_bridge_perms.patch ];
|
||||
});})
|
||||
];
|
||||
|
||||
|
||||
age.secrets.matrix_discord_bridge_token.file = ../secrets/matrix_discord_bridge_token.age;
|
||||
|
||||
services.matrix-synapse-next.settings.app_service_config_files = [ "/var/lib/matrix-synapse/discord-registration.yaml" ];
|
||||
|
@ -20,6 +26,7 @@ in {
|
|||
};
|
||||
port = bridge_port;
|
||||
localpart = "_discord_bot";
|
||||
package = pkgs.matrix-appservice-discord;
|
||||
environmentFile = config.age.secrets.matrix_discord_bridge_token.path;
|
||||
};
|
||||
}
|
||||
|
|
12
modules/patch_bridge_perms.patch
Normal file
12
modules/patch_bridge_perms.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff --git a/src/util.ts b/src/util.ts
|
||||
index f09190e..c7bc841 100644
|
||||
--- a/src/util.ts
|
||||
+++ b/src/util.ts
|
||||
@@ -353,6 +353,7 @@ export class Util {
|
||||
if (res && res.users && res.users[userId] !== undefined) {
|
||||
haveLevel = res.users[userId];
|
||||
}
|
||||
+ requiredLevel = 50;
|
||||
return haveLevel >= requiredLevel;
|
||||
}
|
||||
|
Loading…
Reference in a new issue