Commit Graph
651 Commits
Author SHA1 Message Date
Catalan Lover bc0f0ea6f3 Change self references from Gnuxie/Draupnir to the-draupnir-project/Draupnir (#208) 2024-01-15 23:39:57 +00:00
dependabot[bot] 2fe30e3971 Bump express and @types/express (#121)
Bumps [express](https://github.com/expressjs/express) and [@types/express](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/express). These dependencies needed to be updated together.

Updates `express` from 4.18.1 to 4.18.2
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.1...4.18.2)

Updates `@types/express` from 4.17.13 to 4.17.17
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/express)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: "@types/express"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-15 15:23:33 +00:00
dependabot[bot] 9cb364123d Bump body-parser from 1.20.1 to 1.20.2 (#119)
Bumps [body-parser](https://github.com/expressjs/body-parser) from 1.20.1 to 1.20.2.
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/1.20.1...1.20.2)

---
updated-dependencies:
- dependency-name: body-parser
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-15 14:57:18 +00:00
dependabot[bot] 4f806dbd95 Bump the github-actions group with 1 update (#162)
Bumps the github-actions group with 1 update: [actions/setup-node](https://github.com/actions/setup-node).

- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-15 14:56:44 +00:00
dependabot[bot] 1a407e9cc7 Bump follow-redirects from 1.15.1 to 1.15.4 (#203)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.1 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.1...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-15 14:55:51 +00:00
Gnuxie e9969ff29d Change license to AFL-3.0 (#204)
Please reply with 👍 or approve this PR if you agree to relicense your work under the [Academic Free License](https://opensource.org/license/afl-3-0-php/)

As discussed in #176 we want to change the license to AFL-3.0 so that we have an approved open source license with a condition for distribution or incorporation to provide the source code for the original work (or a link to it and this is implemented currently via the status command. I think we should go a step further and provide the notices file here too as a follow up). 

Contributors previously were asked to agree to provide their [contribution](https://github.com/the-draupnir-project/Draupnir/blob/56e03e9/CONTRIBUTING.md#contributing-code-to-draupnir) under the Apache-2.0 license so that I would be the sole author contributing under the project's [Cooperative Software License](https://github.com/the-draupnir-project/Draupnir/blob/56e03e9/LICENSE), which would in (dubious) theory make relicensing to anything Apache-2.0 compatible straight forward later on. However out of an abundance of caution I would like all the authors who have contributed since forking (to cover the case that someone believes they have contributed under the CSL and not Apache-2.0, and therefore can object) to agree to the license change. This also leaves a concrete paper trail in one place rather than each PR.

Contributors:

- [x] @Mikaela 
- [x] @MTRNord 
- [x] @julianfoad 
- [x] @FSG-Cat 
- [x] @JokerGermany 
- [x] @progval
2024-01-15 14:50:05 +00:00
dependabot[bot] df29fec4cf Bump postcss from 8.4.16 to 8.4.31 (#140)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.16 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.16...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 00:17:49 +01:00
dependabot[bot] 41746d3667 Bump crypto-js from 4.1.1 to 4.2.0 (#159)
Bumps [crypto-js](https://github.com/brix/crypto-js) from 4.1.1 to 4.2.0.
- [Commits](https://github.com/brix/crypto-js/compare/4.1.1...4.2.0)

---
updated-dependencies:
- dependency-name: crypto-js
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 00:16:22 +01:00
Aminda Suomalainen 56e03e9ccb Fix markdown trailing whitespace & exlude .svg from trailing-whitespace checks (#148)
* .pre-commit-config.yaml: properly handle markdown and exclude svg from trailing-whitespace

* {CONTRIBUTING,docs/appservice}.md: remove trailing whitespace
2023-10-21 12:18:52 +01:00
Marcel 5738d764d4 Add support for bot-sdk crypto as an experimental flag (#145)
* Add support for bot-sdk crypto as an experimental flag

* Import and use StoreType enum

* Fail hard instead of continuing in case of having pantalaimon and bot-sdk set up

* Document Option in default.yaml

* Remove obsolete comment
2023-10-21 12:18:10 +01:00
Aminda Suomalainen 3823f22a90 pre-commit autoupdate (#143)
Closes: #141
Fixes: Python 3.12 (and Fedora 39) support
2023-10-12 16:02:05 +01:00
Julian Foad 563a57fdea Fix link to our own copy of moderators.md (#133) 2023-09-22 15:48:47 +01:00
dependabot[bot] 9f04502774 Bump the github-actions group with 4 updates (#125)
Bumps the github-actions group with 4 updates: [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action), [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action), [docker/login-action](https://github.com/docker/login-action) and [docker/build-push-action](https://github.com/docker/build-push-action).


Updates `docker/setup-qemu-action` from 2.2.0 to 3.0.0
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2.2.0...v3.0.0)

Updates `docker/setup-buildx-action` from 2.10.0 to 3.0.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2.10.0...v3.0.0)

Updates `docker/login-action` from 2 to 3
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

Updates `docker/build-push-action` from 4 to 5
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 14:29:18 +01:00
gnuxie 68e68c434c Add gif showing ban command prompts. 2023-09-14 16:48:51 +01:00
gnuxie 0f014afbbb Add "*.gif" to git-lfs in prepearation for GIFs!! wohoo. 2023-09-14 16:48:51 +01:00
Marcel b38a4159a9 Bump the dockerfile to node 20 (#129)
* Bump the CI and dockerfile to node 20

* Revert bumping the CI
2023-09-13 22:05:31 +01:00
Marcel d620ffa206 Move to eslint (#88)
* Move to eslint

* Cleanup leftover tslint

* Cleanup the eslint config file
2023-09-13 12:26:51 +01:00
Aminda Suomalainen b21c0a1df9 Decrease dependency update check to weekly (#124)
* .pre-commit-config.yaml: check ci updates weekly

* dependabot.yml: check for updates weekly instead of daily
2023-09-12 13:24:29 +01:00
gnuxie efe842cc9f v1.85.1 v1.85.1 2023-09-12 11:58:14 +01:00
Gnuxie 69b7209739 Fix RoomUpdateError roomId argument typo (#123)
We were clearly in the process of deleting the
member decleration to just have the decleration be in the constructor.

When we were distracted, leaving a property named `readonly`, which
shouldn't be possible imo, need to add some rule for that prompto.
2023-09-12 11:57:50 +01:00
dependabot[bot] 272d81946b Bump config and @types/config (#118)
Bumps [config](https://github.com/node-config/node-config) and [@types/config](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/config). These dependencies needed to be updated together.

Updates `config` from 3.3.8 to 3.3.9
- [Release notes](https://github.com/node-config/node-config/releases)
- [Changelog](https://github.com/node-config/node-config/blob/master/History.md)
- [Commits](https://github.com/node-config/node-config/compare/v3.3.8...v3.3.9)

Updates `@types/config` from 3.3.0 to 3.3.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/config)

---
updated-dependencies:
- dependency-name: config
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: "@types/config"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 15:08:49 +01:00
Aminda Suomalainen 6694bf547e dependabot.yml: rename everything to github-actions (#120)
I didn't know the "everything" would be visible in PR title like that and it bothers me as it's not really "everything", it's just github-actions.
2023-09-11 15:04:28 +01:00
dependabot[bot] a328f52558 Bump yaml from 2.2.2 to 2.3.2 (#111)
Bumps [yaml](https://github.com/eemeli/yaml) from 2.2.2 to 2.3.2.
- [Release notes](https://github.com/eemeli/yaml/releases)
- [Commits](https://github.com/eemeli/yaml/compare/v2.2.2...v2.3.2)

---
updated-dependencies:
- dependency-name: yaml
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 15:03:58 +01:00
dependabot[bot] 2330ddc719 Bump the everything group with 4 updates (#115)
Bumps the everything group with 4 updates: [actions/checkout](https://github.com/actions/checkout), [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action), [docker/login-action](https://github.com/docker/login-action) and [baptiste0928/cargo-install](https://github.com/baptiste0928/cargo-install).


Updates `actions/checkout` from 2 to 4
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v4)

Updates `docker/setup-buildx-action` from 2.6.0 to 2.10.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2.6.0...v2.10.0)

Updates `docker/login-action` from 1 to 2
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v2)

Updates `baptiste0928/cargo-install` from 1 to 2
- [Release notes](https://github.com/baptiste0928/cargo-install/releases)
- [Changelog](https://github.com/baptiste0928/cargo-install/blob/main/CHANGELOG.md)
- [Commits](https://github.com/baptiste0928/cargo-install/compare/v1...v2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: everything
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: everything
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: everything
- dependency-name: baptiste0928/cargo-install
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: everything
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 14:44:16 +01:00
dependabot[bot] 0112a995b7 Bump the development-dependencies group with 9 updates (#116)
Bumps the development-dependencies group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/crypto-js](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/crypto-js) | `4.0.2` | `4.1.2` |
| [@types/nedb](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/nedb) | `1.8.12` | `1.8.13` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `18.16.7` | `20.6.0` |
| [eslint](https://github.com/eslint/eslint) | `7.32.0` | `8.49.0` |
| [expect](https://github.com/jestjs/jest/tree/HEAD/packages/expect) | `27.2.4` | `29.6.4` |
| [mocha](https://github.com/mochajs/mocha) | `9.2.2` | `10.2.0` |
| [@types/mocha](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mocha) | `9.0.0` | `10.0.1` |
| [ts-mocha](https://github.com/piotrwitek/ts-mocha) | `9.0.2` | `10.0.0` |
| [typescript](https://github.com/Microsoft/TypeScript) | `5.1.6` | `5.2.2` |


Updates `@types/crypto-js` from 4.0.2 to 4.1.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/crypto-js)

Updates `@types/nedb` from 1.8.12 to 1.8.13
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/nedb)

Updates `@types/node` from 18.16.7 to 20.6.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint` from 7.32.0 to 8.49.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.32.0...v8.49.0)

Updates `expect` from 27.2.4 to 29.6.4
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.6.4/packages/expect)

Updates `mocha` from 9.2.2 to 10.2.0
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.2.2...v10.2.0)

Updates `@types/mocha` from 9.0.0 to 10.0.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mocha)

Updates `ts-mocha` from 9.0.2 to 10.0.0
- [Release notes](https://github.com/piotrwitek/ts-mocha/releases)
- [Changelog](https://github.com/piotrwitek/ts-mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/piotrwitek/ts-mocha/commits)

Updates `typescript` from 5.1.6 to 5.2.2
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.1.6...v5.2.2)

---
updated-dependencies:
- dependency-name: "@types/crypto-js"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
- dependency-name: "@types/nedb"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: development-dependencies
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: development-dependencies
- dependency-name: expect
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: development-dependencies
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: development-dependencies
- dependency-name: "@types/mocha"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: development-dependencies
- dependency-name: ts-mocha
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: development-dependencies
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 13:38:45 +01:00
Aminda Suomalainen ee33c9aa18 .github/dependabot.yml: attempt to group updates (#114)
* .github/dependabot.yml: first attempt at grouping production & development dependencies

Resolves: #113

* dependabot: don't group production depedencies

* dependabot: group GitHub actions
2023-09-11 13:28:38 +01:00
Aminda Suomalainen fe7f388d0e .github/dependabot.yml: explicitly configure dependabot (#103) 2023-09-11 11:15:06 +01:00
Marcel 645dd8950f Upgrade matrix-appservice bridge to ^9.0.1 (#102) 2023-09-11 11:08:16 +01:00
gnuxie fb0199fdc9 v1.85.0 v1.85.0 2023-09-07 16:00:02 +01:00
Gnuxie 26468afcde Only CommandExceptions should log at creation. (#99)
Before CommandError's where and they are used
liberally for validating command arguments by
returning a CommandResult for several possible
options. Which gives a lot of spam. It's not necessary
anyways since these should only be used for known errors.
2023-09-07 15:59:20 +01:00
Gnuxie 4b656306ed Deprecate config.verboseLogging (#98)
Shouldn't change what is being logged to the log file,
but it does change what gets sent to the management room.
I've been meaning to disable this for some time as it generally
confuses new users and it makes the bot feel very confusing and
low quality. It also means you are likely to miss more important
messages in the magement room.

Another problem it causes is an inconsistent view when testing
the software and it's an unreasonable burden to test for both
settings.

It's not clear what the value of this setting is apart from
providing comfort to some users who want to see the ACL readout.
But even then it's a very inefficient way of doing that,
so i'd rather another feature be requested by users that want to see that.
2023-09-07 15:27:00 +01:00
Gnuxie bef21850e8 Use --forbid-only flag in integration test suite. (#97)
Yes this has happened again, at least we know how to fix it now.
2023-09-07 14:13:26 +01:00
gnuxie 9d841697b2 Rework RoomUpdateErrors to be CommandErrors or CommandExceptions
https://github.com/Gnuxie/Draupnir/pull/93/
2023-09-05 19:53:02 +01:00
gnuxie 3ec37e3fe8 Introduce concept of Known and Unknown exceptions.
Sometimes we don't need exceptions to be reported on the error level.
This is especially true when the user does something out of order
and there's a permission error.
If we're aware of that possibility as developers and have accounted
for it, then it's unnecessary for it to be treated the same way
as a fatal error.

We also decided to log CommandExceptions and CommandErrors as
early as possible.

https://github.com/Gnuxie/Draupnir/pull/93/
2023-09-05 19:53:02 +01:00
gnuxie 73601687a8 Add UnbanPropagation BanPropagationProtection.
https://github.com/Gnuxie/Draupnir/pull/93/
2023-09-05 19:53:02 +01:00
gnuxie 29a8bec086 Bring various documentation up to date with current events. 2023-09-04 20:44:11 +01:00
gnuxie 2a4829dc1e Use <details> for error detail.
https://matrix.to/#/!IaWNErZAgQUhGqJXjX:matrix.org/$634tyYnNJK_zpNb4wH1zHbYeMOsDBHMpwdWPg1GdAEU?via=matrix.org&via=the-apothecary.club&via=envs.net
2023-09-04 15:25:35 +01:00
gnuxie e8847a2524 Allow Draupnir to ignore m.room.server_acl
https://github.com/Gnuxie/Draupnir/pull/85
2023-09-04 15:25:35 +01:00
gnuxie 1e82c15d82 Add font tag to DeadDocument
https://github.com/Gnuxie/Draupnir/pull/85
2023-09-04 15:25:35 +01:00
gnuxie ea49b0a536 Use JSX for the protected rooms set's printActionResult.
We've done this to make the implementation a lot cleaner and
managable. However, we've taken the opportunity to simplify
all of the client code that would use this method.

Some of these simplifications might come at a small cost.
Updating server ACL, member bans and checking power levels
would all be clearly titled as seperate checks.
However, it should still be obvious what has gone wrong,
since any error would have to give a more detailed explanation.
And not everything is going to fail all at once (and if it does,
there are bigger issues).

a lot cleaner
https://github.com/Gnuxie/Draupnir/pull/85
2023-09-04 15:25:35 +01:00
gnuxie 601aa33bc6 Remove Mjolnir's ErrorCache.
A bizarre contraption.
The ErrorCache was seemingly introduced to reduce the number of errors
in the management room.
https://github.com/matrix-org/mjolnir/commit/82214c6cd88d83abed05fec4a871a874e6e0265b
It makes sense why it was added if you consider that many admins
will run Draupnir without giving it the permission to manage server
ACL in its rooms. Though, I'm not sure why then you would add the error
cache rather than properly supporting that use case.
So perhaps there were other reasons.
Either way, what is drawing the line for me is that the ErrorCache
will suppress any error within rooms that is not a permission error,
if there was any error that was not a permission error within a
15 minute window.
Considering the typical Draupnir will not even sync
for hours at a time, even in large communities.
It does present a problem for rooms with a lot of join/leave events.
I think that's probably why the error cache was added.

Ahh, well, fuck.

Well what is the real solution to this?

The real solution when the kind is acl is to allow the bot to run
without applying ACLs.

Ok fine but, hey wait a minute.
Why would there be any other kind of persistent error
when banning someone that would be unimportant enough to silently
hide in an ErrorCache??

IDK let's just add an opttion to disable server ACL,
since they might want to use another tool for that anyhow.

Out of scope for the current work though.
https://github.com/Gnuxie/Draupnir/pull/85
2023-09-04 15:25:35 +01:00
Aminda Suomalainen bc0fc7c25a package.json: refer to https clone url (#90)
Signed-off-by: Aminda Suomalainen <suomalainen+git@mikaela.info>
2023-09-04 12:38:07 +01:00
dependabot[bot] c9cc5693ac Bump matrix-appservice-bridge from 8.1.1 to 8.1.2 (#71)
Bumps [matrix-appservice-bridge](https://github.com/matrix-org/matrix-appservice-bridge) from 8.1.1 to 8.1.2.
- [Release notes](https://github.com/matrix-org/matrix-appservice-bridge/releases)
- [Changelog](https://github.com/matrix-org/matrix-appservice-bridge/blob/8.1.2/CHANGELOG.md)
- [Commits](https://github.com/matrix-org/matrix-appservice-bridge/compare/8.1.1...8.1.2)

---
updated-dependencies:
- dependency-name: matrix-appservice-bridge
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 12:37:09 +01:00
Marcel 0de9ad3333 Add command that allows to easily set the Displayname of a bot (#91)
This adds the `displayname` command which just sets the displayname of the user.

-----

* Add command that allows to easily set the Displayname of a bot

* Only set the displayname once

* Add missing matrix interface adaptor and use CommandError

* Make displaynames with spaces work
2023-09-04 12:34:26 +01:00
Marcel f55d8a453d Add health endpoint to appservice and add metrics via prometheus (#70)
This adds a `/healthz` endpoint to the appservice which allows this to work more nicely in kubernetes.

It also adds some metrics for tracking the provisioning state.

Grafana result:
![image](https://github.com/Gnuxie/Draupnir/assets/1374914/9426c8e6-2c1c-469c-8902-1b9e2b6db529)

Note: The ts-ignore are sadly required since the `_getValue` method is not public :/ I didnt find another solution apart from tracking it maybe elsewhere.

* Add health endpoint to appservice and add metrics via prometheus

* Ensure that we dont have duplicate metrics when the appservice is registered multiple times

* Move gauge modifications to utils function

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix typo
2023-09-04 12:32:26 +01:00
Marcel 2ea8ddf864 Use the new help style on the appservice commands and add missing descriptions for the arguments (#69)
* Use the new help style on the appservice commands and add missing descriptions for the arguments

* Make the first letter of the table name uppercase in the help table
2023-09-04 12:30:50 +01:00
Aminda Suomalainen e3925afc3b .editorconfig: fix invalid value s/off/unset/g (#86)
* .editorconfig: s/off/unset/g

This was breaking prettier and neovim as apparently off was invalid value

* .editorconfig: merge the two unset rule blocks
2023-09-01 11:28:29 +01:00
Gnuxie 0a7305b8fa A simple script for testing room membership query. (#81)
https://github.com/Gnuxie/Draupnir/issues/80
2023-08-29 13:56:33 +01:00
Aminda Suomalainenandgnuxie e4c02b96cd Add pre-commit configuration (#34)
* add .pre-commit-config.yaml

Signed-off-by: Aminda Suomalainen <suomalainen+git@mikaela.info>

* .editorconfig: decrease indent size for text

* .pre-commit-config.yaml: remove prettier

Signed-off-by: Aminda Suomalainen <suomalainen+git@mikaela.info>

* .editorconfig consistency.

* .pre-commit-config.yaml: restore sample hooks

* .editorconfig: disable indent_size for LICENSE & NOTICE

* pre-commit run --all-files

* tsconfig.json: tabs to spaces

* .pre-commit-config.yaml: update editorconfig-checker to 2.7.2

* .editorconfig: disable indent_size for markdown

* mjolnir-entrypoint.sh: retab

* .editorconfig: also exclude json from indent checking

* test/nginx.conf: retab

* test/integration/commands/redactCommandTest.ts: remove leading space

* retab or remove leading whitespaces for the rest of the files

* src/appservice/datastore.ts remove newlines

* test/integration/commands/roomTest.ts: remove leading space.

---------

Signed-off-by: Aminda Suomalainen <suomalainen+git@mikaela.info>
Co-authored-by: gnuxie <Gnuxie@protonmail.com>
2023-08-29 13:38:00 +01:00
Gnuxie 56ddbdf96c Failure to ban a single member should not stop other bans being applied. (#79)
Fixes https://github.com/Gnuxie/Draupnir/issues/74.
2023-08-28 16:38:24 +01:00