mirror of
https://github.com/icewind1991/mx-puppet-steam.git
synced 2026-06-03 09:34:13 +02:00
patch matrix-bot-sdk to fix compatibility with synapse 1.90+
This commit is contained in:
parent
620bebece0
commit
f1c74277ac
4 changed files with 762 additions and 3 deletions
13
flake.nix
13
flake.nix
|
|
@ -9,7 +9,7 @@
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
utils,
|
utils,
|
||||||
}:
|
}:
|
||||||
utils.lib.eachDefaultSystem (system: let
|
utils.lib.eachDefaultSystem (system: let
|
||||||
overlays = [];
|
overlays = [];
|
||||||
pkgs = (import nixpkgs) {
|
pkgs = (import nixpkgs) {
|
||||||
inherit system overlays;
|
inherit system overlays;
|
||||||
|
|
@ -18,7 +18,16 @@
|
||||||
in rec {
|
in rec {
|
||||||
# `nix develop`
|
# `nix develop`
|
||||||
devShell = pkgs.mkShell {
|
devShell = pkgs.mkShell {
|
||||||
nativeBuildInputs = with pkgs; [nodejs.pkgs.node-pre-gyp nodejs.pkgs.node-gyp-build pkg-config which nodePackages.typescript python3];
|
nativeBuildInputs = with pkgs; [
|
||||||
|
nodejs
|
||||||
|
nodejs.pkgs.node-pre-gyp
|
||||||
|
nodejs.pkgs.node-gyp-build
|
||||||
|
pkg-config
|
||||||
|
which
|
||||||
|
nodePackages.typescript
|
||||||
|
python3
|
||||||
|
nodePackages.patch-package
|
||||||
|
];
|
||||||
buildInputs = with pkgs; [libjpeg pixman cairo pango postgresql];
|
buildInputs = with pkgs; [libjpeg pixman cairo pango postgresql];
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
733
package-lock.json
generated
733
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -7,7 +7,8 @@
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"lint": "tslint --project ./tsconfig.json -t stylish",
|
"lint": "tslint --project ./tsconfig.json -t stylish",
|
||||||
"start": "npm run-script build && node ./build/index.js",
|
"start": "npm run-script build && node ./build/index.js",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"postinstall": "patch-package"
|
||||||
},
|
},
|
||||||
"author": "Icewind",
|
"author": "Icewind",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
@ -27,6 +28,7 @@
|
||||||
"@types/gif-encoder": "^0.7.0",
|
"@types/gif-encoder": "^0.7.0",
|
||||||
"@types/node": "^14.14.22",
|
"@types/node": "^14.14.22",
|
||||||
"@types/steamid": "^2.0.0",
|
"@types/steamid": "^2.0.0",
|
||||||
|
"patch-package": "^8.0.0",
|
||||||
"typescript": "^4.1.3"
|
"typescript": "^4.1.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
15
patches/@sorunome+matrix-bot-sdk+0.5.13.patch
Normal file
15
patches/@sorunome+matrix-bot-sdk+0.5.13.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
diff --git a/node_modules/@sorunome/matrix-bot-sdk/lib/appservice/Appservice.js b/node_modules/@sorunome/matrix-bot-sdk/lib/appservice/Appservice.js
|
||||||
|
index f8c7d70..8c8c3b6 100644
|
||||||
|
--- a/node_modules/@sorunome/matrix-bot-sdk/lib/appservice/Appservice.js
|
||||||
|
+++ b/node_modules/@sorunome/matrix-bot-sdk/lib/appservice/Appservice.js
|
||||||
|
@@ -397,8 +397,8 @@ class Appservice extends events_1.EventEmitter {
|
||||||
|
}
|
||||||
|
isAuthed(req) {
|
||||||
|
let providedToken = req.query ? req.query["access_token"] : null;
|
||||||
|
- if (req.headers && req.headers["Authorization"]) {
|
||||||
|
- const authHeader = req.headers["Authorization"];
|
||||||
|
+ if (req.headers && req.headers["authorization"]) {
|
||||||
|
+ const authHeader = req.headers["authorization"];
|
||||||
|
if (!authHeader.startsWith("Bearer "))
|
||||||
|
providedToken = null;
|
||||||
|
else
|
||||||
Loading…
Add table
Add a link
Reference in a new issue