Commit Graph

69 Commits

Author SHA1 Message Date
gnuxie
945f60ddcc Revert "A command to show when users in a given room have joined (#225)"
This reverts commit 26ae55cd24.
2022-04-29 12:32:55 +01:00
gnuxie
1d29b50f37 Revert "New command !mjolnir since <date or duration> <kick | ban | show> <limit> [reason] [...rooms] (#238)"
This reverts commit e05616b327.

We are reverting the since command for multiple reasons.

1. The roomMemberTest that this commit brings has an `it` block ("RoomMemberManager counts correctly when we actually join/leave/get banned from the room")
   that now fails in an infinite loop and we struggle to understand how it ever passed.

   > essentially they assert that Mjolnir is in the room here https://github.com/matrix-org/mjolnir/blob/main/test/integration/roomMembersTest.ts#L303
     Which is great, but they've never joined it or have been invited.
     https://github.com/matrix-org/mjolnir/blob/main/test/integration/roomMembersTest.ts#L302 but then we also assert that there's only one person in the room, but this can't be Mjolnir because Mjolnir didn't
     create these rooms https://github.com/matrix-org/mjolnir/blob/main/test/integration/roomMembersTest.ts#L273, yet they're checking that Mjolnir is indeed there.

   The loop in question is also over complicated and hard to read https://github.com/matrix-org/mjolnir/pull/225/files#diff-67e09dce96f975b2df641d3c600f60f48aeeb9e54a472b612bce90535b4aa0e4R285-R295

   Should have been written like this.
   ```
   while(!roomIds.each(roomId => this.mjolnir.protectedRooms[roomId])) {
       await new Promise(resolve => setTimeout(resolve, 1_000));
   }
   ```

2. The RoomMemberManager is broken even after fixing the test (fixing so that it fails "normally" without getting caught in the loop by changing the setup code) and we have decided is not worth fixing yet.
   This is because it is complex & the manager only knows about joins that have happened since Mjolnir has started syncing, this has proven un-initiative to Mjolnir users already.
   Possible solutions are using the planned the full rolling room member/state cache (https://github.com/matrix-org/mjolnir/issues/273) or using `/messages` with a filter for member events for the `!since` command, since `/messages` is "chronologically" ordered.
2022-04-29 12:10:09 +01:00
Gnuxie
3d10f998b7
Change antispam Python module verison with mjolnir version. (#264)
The reason we want this is so that people do not forget to change the version number in the synapse module.
The precedent is that the version number has been 0.1.0 since the begging until now.
While this solution does mean that there may be new version of the module where
nothing has actually changed, this is still better than not changing the version at all.
Another version scheme for the module would be inconsistent to
the git repository tags and that has the potential to cause much more confusion
than "blank" version bumps.
If this is a problem, then antispam must be extracted to another repository.

In order to test this, run `yarn version --patch` observe the changes with `git log` and `git diff HEAD~`,
then YOU MUST delete the tag with `git tag --delete vd.d.d` when you are finished.

* more robust
2022-04-12 16:36:35 +01:00
gnuxie
4008e3f65d v1.4.1 2022-03-21 14:28:21 +00:00
gnuxie
fb027fe2af v1.4.0 2022-03-21 12:32:32 +00:00
David Teller
e05616b327
New command !mjolnir since <date or duration> <kick | ban | show> <limit> [reason] [...rooms] (#238)
A new command `since` to affect all users who have joined a protected room since a given date.
2022-03-21 10:39:15 +01:00
David Teller
26ae55cd24
A command to show when users in a given room have joined (#225) 2022-03-07 11:34:25 +01:00
Gnuxie
17dd0aa173
Fix the test script yarn test:manual and add it to tsconfig (#234)
* Add test:manual launch script to tsconfig

this is so we won't keep breaking it
2022-02-24 14:46:15 +00:00
David Teller
82a2e63d23
A room Protection designed to measure lag in a room (#217) 2022-02-24 13:43:31 +01:00
gnuxie
a3f77e1b39 v1.3.2 2022-02-23 10:38:42 +00:00
Jess Porter
f70d97e4d9
enable noImplicitAny (#209) 2022-02-02 12:43:05 +00:00
gnuxie
fcf53d15b8 v1.3.1 2022-02-01 13:21:04 +00:00
gnuxie
767e1a5a7e v1.3.0 2022-02-01 10:55:21 +00:00
gnuxie
9e96d399c0 Remove axios from the test suite, it is unnecessary.
It's probably also got problems.
2022-01-25 18:22:34 +00:00
gnuxie
dacbc1cde5 Bump minimum node version to >=14
Needed to merge https://github.com/matrix-org/mjolnir/pull/186 & node 12 is approaching EOL.
2022-01-19 16:46:18 +00:00
David Teller
c48a1e8ffc Let's make sure that we can still check for errors with concise error handling 2022-01-07 14:06:10 +01:00
David Teller
a21415a04c
Give the ability to moderators to react quickly to /report abuse reports. (#137) 2021-11-09 13:15:49 +01:00
gnuxie
4e8315be44 Add regression test for timeline pagination. 2021-10-19 16:28:55 +01:00
David Teller
06e5f00b2d
Intercept /report and display human-readable abuse reports in the moderation room - Resolves #38 (#135)
* Intercept /report and display human-readable abuse reports in the moderation room - Resolves #38
2021-10-07 14:42:08 +02:00
gnuxie
c29cfe370a make yarn test only runs unit tests for now while we sortout CI setup 2021-09-27 15:34:06 +01:00
gnuxie
ac075fd22e Remove dependencies from old test harness 2021-09-27 15:33:15 +01:00
gnuxie
b838caee09 Add script for manual testing with mx-tester 2021-09-27 15:33:15 +01:00
gnuxie
a86afd3cc8 Remove old test harness 2021-09-24 18:25:28 +01:00
gnuxie
68aa717826 Rework integration tests to work with mx-tester 2021-09-24 18:25:27 +01:00
gnuxie
b0ee846534 Update package.json and yarn.lock to include harness dependencies. 2021-09-24 18:25:27 +01:00
gnuxie
7ea05629e3 v1.1.20 2021-09-17 12:10:48 +01:00
Travis Ralston
b6b427a458 v0.1.19 2021-08-17 09:27:17 -06:00
David Teller
b60f503e2e FIXUP 2021-08-17 12:56:25 +02:00
David Teller
62b30b19d9 Replace shutdown_room API with DELETE /_synapse/admin/v1/rooms/<room_id> - Resolves #76, closes #96
As per https://github.com/matrix-org/synapse/issues/9052, shutdown_room is going away, to be replaced with DELETE /_synapse/admin/v1/rooms/<room_id>.
2021-08-17 12:54:24 +02:00
Travis Ralston
43da763bb2 0.1.18 2021-07-01 15:12:51 -06:00
Travis Ralston
ff4cbc018f Update matrix-bot-sdk and use request cleaning function 2021-07-01 15:11:27 -06:00
Travis Ralston
d7bacad85c Update packages 2021-07-01 13:45:28 -06:00
Travis Ralston
9f1c02c73f v0.1.17 2021-02-05 14:10:49 -07:00
Travis Ralston
84c4ba830c v0.1.16 2020-06-12 08:16:13 -06:00
Travis Ralston
39f243dcce v0.1.15 2020-05-11 21:42:27 -06:00
Travis Ralston
47dfdf5b33 Upgrade packages 2020-05-11 21:38:20 -06:00
Travis Ralston
46bc6a1a0f Bump bot-sdk version to handle published aliases better 2020-05-11 21:31:47 -06:00
Travis Ralston
2156beeda2 v0.1.14 2020-04-15 08:14:00 -06:00
Travis Ralston
f897f8eb47 Update packages 2020-04-14 16:17:05 -06:00
Travis Ralston
91afabcac7 v0.1.13 2020-03-05 15:40:31 -07:00
Travis Ralston
f0476ccc80 v0.1.12 2020-02-13 23:05:42 -07:00
Travis Ralston
790d1f2ff0 Update matrix-bot-sdk 2020-02-13 14:23:10 -07:00
Travis Ralston
60083b49f4 Update matrix-bot-sdk package 2020-02-12 15:05:52 -07:00
Travis Ralston
387c477bf0 v0.1.11 2020-01-23 12:02:48 -07:00
Travis Ralston
fbf82f8402 v0.1.10 2020-01-21 15:26:00 -07:00
Travis Ralston
c0365416fa Add an option to protect all joined rooms 2020-01-21 15:19:03 -07:00
Travis Ralston
cebd0309cb v0.1.9 2019-12-14 09:38:44 -07:00
Travis Ralston
85ad0e7997 v0.1.8 2019-12-04 19:29:05 -07:00
Travis Ralston
4f8b55c45f Update matrix-bot-sdk 2019-12-04 18:46:00 -07:00
Travis Ralston
d5a366aa6d v0.1.7 2019-11-14 16:00:09 -07:00