Commit Graph

469 Commits

Author SHA1 Message Date
gnuxie
f9f7dcf8d7 start testing the web api used by the widget 2022-11-15 17:05:30 +00:00
gnuxie
0bd666f168 Fix improper closing of resources in integration tests. 2022-11-15 17:05:30 +00:00
gnuxie
51e601603d FIXUP doc bits idk 2022-11-15 17:05:30 +00:00
gnuxie
4cd13f6f70 Add some introductory docs for deploying the appservice. 2022-11-15 17:05:30 +00:00
gnuxie
604c3f5f1c Change entrypoint in Dockerfile so that we can start the appservice.
We could have used another Dockerfile for the appservice,
extending the exising one but we decided not to because there
would have been lots of fiddling around the entrypoint
and logistics involved around adding a tag for it via github actions.
Not to mention that this would be duplicating the image
just to run it with a different binary.

This solution is much simpler, backwards compatible, and conscious about the future.
2022-11-15 17:05:30 +00:00
gnuxie
689b5b9ae6 Begin integration test suite for appservice. 2022-11-15 17:05:30 +00:00
gnuxie
7ad172006b oopsie, this should also trigger when type isn't provided 2022-11-15 17:05:30 +00:00
gnuxie
ab4655fdcb Ammend config not to clash with existing CI
this means that the appsrvice bot is now called 'mjolnir-bot' by default
which was easier than going through old code base and renaming
2022-11-15 17:05:30 +00:00
gnuxie
6d048076bf regenerate mjolnir-registration in mx-tester 2022-11-15 17:05:30 +00:00
gnuxie
94e1a897a4 Shadowed name: 'request' in api.ts 2022-11-15 17:05:30 +00:00
gnuxie
a03640c8ac Redesign initialization API of many mjolnir.
It's much harder to forget to initialize the components now that you have to in order to construct them in the first place.
2022-11-15 17:05:30 +00:00
gnuxie
074a16bfaf limited access control
still needs hooking up when mjolnir restarts, and when the access control changes
2022-11-15 17:05:30 +00:00
gnuxie
c0ad6dab1c Add some much needed ergonomics to how the bridge is constructed. 2022-11-15 17:05:30 +00:00
gnuxie
4c434c6c30 allow appservice to be configured 2022-11-15 17:05:30 +00:00
jesopo
8771ca936d launch and use postgres in a container whilst using mx-tester 2022-11-15 17:05:30 +00:00
gnuxie
a0da2e1145 enable esModuleInterop 2022-11-15 17:05:30 +00:00
gnuxie
383d3fe25f remove unnecessary import 2022-11-15 17:05:30 +00:00
gnuxie
fb2868d815 tighter guard around room type in PolicyList
matrix-bot-sdk imporved the types for this
2022-11-15 17:05:30 +00:00
gnuxie
9781b6e982 idk why we had nedb in there for matrix-appservice-bridge 2022-11-15 17:05:30 +00:00
jesopo
8b1faf0877 reconstructing mjolnirs after a reboot works! 2022-11-15 17:05:30 +00:00
jesopo
f383a1c416 postgres db 2022-11-15 17:05:30 +00:00
gnuxie
efb4cebbd1 Refactor list creation 2022-11-15 17:05:30 +00:00
jesopo
9a49d29821 better name for policy room 2022-11-15 17:05:30 +00:00
jesopo
8ebe257146 warrior of light, use the echo 2022-11-15 17:05:30 +00:00
gnuxie
b075beed1a bleh yarn lock broke after rebase 2022-11-15 17:05:30 +00:00
jesopo
67557047c5 missing await on mjolnirManager.createNew 2022-11-15 17:05:30 +00:00
jesopo
ad6e787486 add /join endpoint to api backend 2022-11-15 17:05:30 +00:00
jesopo
039f64adb4 remove ratelimits from appservice mjolnirs 2022-11-15 17:05:30 +00:00
jesopo
f67f64e3cd shouldn't've changed this 2022-11-15 17:05:30 +00:00
jesopo
da006d74c5 use body-parser, bind api handlers 2022-11-15 17:05:30 +00:00
jesopo
caa079462a response statuses need bodies 2022-11-15 17:05:30 +00:00
jesopo
3c4eb5ffa3 update MjolnirManager for recent main changes 2022-11-15 17:05:30 +00:00
jesopo
93a1b7476f remove ability for user to specify custom management room 2022-11-15 17:05:30 +00:00
jesopo
4a9e5d422d resolve typing errors, run api when appservice runs 2022-11-15 17:05:30 +00:00
jesopo
be18613722 fix some linting, move all Intent related code to AppService.ts 2022-11-15 17:05:30 +00:00
jesopo
6d604190a4 add managementRoomId to provisionNewMjolnir 2022-11-15 17:05:30 +00:00
jesopo
c1d79a698b draft widget backend 2022-11-15 17:05:30 +00:00
gnuxie
b943a02cda update deps 2022-11-15 17:05:30 +00:00
gnuxie
f68b511256 move appservice bits 2022-11-15 17:05:30 +00:00
gnuxie
94040b00d6 AppService start 2022-11-15 17:05:30 +00:00
David Teller
81cd91c250
Unbitrotting ruleserver tests (#418) 2022-11-15 13:06:41 +01:00
Gnuxie
fb52e3dcb2
Improve the clarity of the unban command (#402)
Also fix a years long bug where the Flooding/Media protection wouldn't stop redacting users

Closes #393
Closes #394

* Warn about room level bans when using unban

https://github.com/matrix-org/mjolnir/issues/394

* Clear internal queues within protections when unban happens.

https://github.com/matrix-org/mjolnir/issues/393
2022-11-07 11:28:59 +00:00
Gnuxie
2c00ac4372
Always echo policy list changes (#401)
closes https://github.com/matrix-org/mjolnir/issues/392.
2022-11-07 11:27:54 +00:00
gnuxie
a970733d0b Update roomMemberTest for removal of mjolnir.protectedRooms object.
https://github.com/matrix-org/mjolnir/issues/370.
2022-10-19 15:21:51 +01:00
gnuxie
cfea765493 Fix list rooms command improperly iterating protected rooms. 2022-10-19 15:21:51 +01:00
gnuxie
c7ba745081 Stop ProtectedRoomsSet verifying permissions for unprotected rooms. 2022-10-19 15:21:51 +01:00
gnuxie
c537f2067e protected rooms config test
https://github.com/matrix-org/mjolnir/issues/370
2022-10-19 15:21:51 +01:00
gnuxie
cea6944c92 Status command can distinguish between protected and watched lists.
https://github.com/matrix-org/mjolnir/issues/370
2022-10-19 15:21:51 +01:00
gnuxie
5c2e4ab0bb Change list creation command to also protect the new room
https://github.com/matrix-org/mjolnir/issues/370
2022-10-19 15:21:51 +01:00
gnuxie
97673cdccb Make Mjolnir use ProtectedRoomsConfig
https://github.com/matrix-org/mjolnir/issues/370
2022-10-19 15:21:51 +01:00