64 Commits

Author SHA1 Message Date
Will Hunt
082a61f802
Split cache config from queue config. (#902)
* Split out queue and cache config

* Update usages of cache config,

* Update default

* Cleanup

* Make queue optional.

* config updates.

* changelog

* update spec config

* Update tests

* tweak import

* Update default config.

* fixup test

* Update config.sample.yml

Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
Signed-off-by: Will Hunt <will@half-shot.uk>

* Update encryption.md

Signed-off-by: Will Hunt <will@half-shot.uk>

* Clear up worker config

Signed-off-by: Will Hunt <will@half-shot.uk>

* Update src/config/Config.ts

Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
Signed-off-by: Will Hunt <will@half-shot.uk>

* update helm config

* lint

* fix meta

* tidy tidy

* revert logging change

* lint rust

---------

Signed-off-by: Will Hunt <will@half-shot.uk>
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
2024-03-19 16:45:52 +00:00
Minecraftchest1
6c6cd6ee92
Change example Openid Connect callback url's to be correct. (#899)
* Change oauth urls in config sample

Signed-off-by: Minecraftchest1 <minecraftchest1@outlook.com>

* Update github docs oauth url

Signed-off-by: Minecraftchest1 <minecraftchest1@outlook.com>

* Fix default oauth2 callback url.

Signed-off-by: Minecraftchest1 <minecraftchest1@outlook.com>

* Create changelog docs.

Signed-off-by: Minecraftchest1 <minecraftchest1@outlook.com>

---------

Signed-off-by: Minecraftchest1 <minecraftchest1@outlook.com>
2024-02-26 08:45:30 +00:00
Will Hunt
a539ad5e54
Ensure sample config only defaults to bare minimum requirements (#826)
* Comment out parts of the sample config that do not need to be on by default

* Update config

* Create 826.misc
2023-10-11 10:26:23 +01:00
Tadeusz Sośnierz
a64a561698
Bridge Gitlab comment replies as Matrix threads (#758)
* Bridge Gitlab comment replies as Matrix threads

* Persistently store Gitlab Discussion-Thread mapping

* Remove leftover debug line

* Denoise comment descriptions when they happen in Matrix threads

* Make comment debouncing time configurable

* Add some tests for Gitlab comments

* De-only Gitlab comment tests

* Linting

* Changelog

* Map multiple Gitlab discussions to a single Matrix thread

We debounce Gitlab comments, so multiple discussions can end up in one thread.
This ensures that replies to *any* of these discussions end up in the same thread.

* Add tests for the many-to-one reply case

* Move SerializedGitlabDiscussionThreads to Types

* Update changelog.d/758.feature

Co-authored-by: Will Hunt <will@half-shot.uk>

* Fix instructions for validating your config using Docker (#794)

* Fix instructions for validating your config using Docker

Fixes GH-787

* Changelog

---------

Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>

* Add more icons to GitHub messages (#795)

* Add more icons to GitHub messages

* Add merged icon

* Lint

* Add changelog

* Bump word-wrap from 1.2.3 to 1.2.4 (#799)

* Bump word-wrap from 1.2.3 to 1.2.4

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add changelog

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>

* Update matrix-appservice-bridge to 9.0.1 (#800)

* Bump semver from 5.7.1 to 5.7.2 (#797)

Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Will Hunt <will@half-shot.uk>

* 4.4.0

* 4.4.1

* Set the default commentDebouncMs for Gitlab in its Config

* Rename `approvalState` to something more fitting

* Update sample config

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
Co-authored-by: Will Hunt <will@half-shot.uk>
Co-authored-by: Connor Davis <mail@connordav.is>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
2023-08-14 12:58:21 +00:00
Will Hunt
172ae30a73
Enable feeds to be polled concurrently (#779)
* Add support for concurrent RSS feed reading

* Add feed concurrency polling

* Actually load all workers

* Ensure feed just sleeps if there are no urls to poll

* Fix map

* Update default config

* Update src/feeds/FeedReader.ts

Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>

* Update src/feeds/FeedReader.ts

Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>

---------

Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
2023-06-14 12:41:14 +00:00
Justin Carlson
0c4a493c56
Add support for uploading avatars (#767)
* Add uploading configured avatar images

* Add avatar assets

* Update docs and sample config

* Add changelog

* Fix sample config

* Add removing avatars when none configured
2023-05-24 13:16:37 +00:00
Will Hunt
b9313cd140
Add Sentry support (#754)
* Add sentry support

* Add basic listening for errors on express.

* Additional event types

* Add a default config

* changelog

* Improve wording

* Add docs
2023-05-18 11:05:23 +00:00
Will Hunt
01159fa0d1
Update yaml dependency (#728)
* Update yaml dependency

* changelog
2023-04-25 15:52:57 +00:00
Christian Paul
67fc55af93
Change URL protocol in the ocumentation and sample configs to HTTPS (#623)
* Config: Use variables for similar values
* Configs and Documentation: http -> https, except for localhost
2023-01-13 16:39:34 +01:00
Justin Carlson
9a7839ce42
Implement separate bot users per service (#573)
* Add service bots config

* Add joined rooms manager and keep track of joined rooms

* Add bot users manager and ensure registration and profiles

* Improve joined rooms manager and set up already joined rooms

* Handle invites with service bots

* Handle messages with service bots

* Use service bots for connections

* Use service bots in widget and provisioning APIs

* Use service bots in setup connections

* Use service bots for feed connections

* Handle admin rooms for service bots

* Fix confused event type and service type in provisioning and widget APIs

* Fix generic webhooks service name

* Fix enabled services config

* Handle power level change

* Create widgets with service scope

* Use service bots for gitlab repo connections

* Use service bots for gitlab issue connections

* Use service bots for generic webhook connections

* Use service bots for figma file connections

* Use service bots when verifying state events

* Use service bots for github repo connections

* Use service bots for github discussion connections

* Use service bots for github discussion space connections

* Use service bots for github project connections

* Use service bots for github issue connections

* Use service bots for github user space connections

* Use service bots for jira connections

* Make sure ghost users are invited for gitlab issue comments

* Configure one service per service bot

* Add changelog

* Update tests

* Fix up following rebase

* Fix comment

* Use getter for enabled services

* Ensure homeserver can be reached before registering bots

* Add intent getter on bot user

* Update config comment

* Merge joined rooms manager with bot users manager

* Remove unused localpart from bot user class

* Refactor to pass in bot users manager

* Improve priority sort function

Co-authored-by: Christian Paul <christianp@matrix.org>

* Fix priority sort

Higher priority should come first

* Add debug log when invites are rejected

* Use different state key for scoped setup widgets

* Use different subtitles to differentiate service bots setup widgets

* Refactor bot user setup into bot users manager

* Refactor to reduce duplication in widget API

* Consistent room ID and intent args order

* Add docs and update changelog

* Add overrideUserId deprecation warning

* Add service bots link

Co-authored-by: Christian Paul <christianp@matrix.org>
Co-authored-by: Will Hunt <will@half-shot.uk>
2023-01-13 15:32:09 +00:00
Will Hunt
abe4fefda4
Mark encryption as experimental (#610)
* Update config to mark encryption support as experimental

* Mention encryption as experimental in docs

* changelog

* Hide empty values from config

* transmuate snakes into camels
2023-01-05 16:25:48 +00:00
Will Hunt
c962f17a91
Add support for native e2ee (#299)
* Add support for native e2ee

* Various temps to coax it into working

* Formatting nitpicks

* Include stable registration config key for msc2409

* Update default config with encryption options

* Manage admin rooms with bot-sdk DMs

This also enables encryption for new admin rooms when appropriate.

* Update config comments for encryption settings

- Add comment to clarify Redis (the `queue` section) must be configured
  in order for encryption to work
- Mention that the `encryption` section is optional, and omitting it
  will disable encryption support

* Update docs for encryption support

* Add changelog

* Add to docs some notes about encryption state

* Move all post-join logic to onRoomJoin

* Block post-join actions on crypto setup

Requires https://github.com/turt2live/matrix-bot-sdk/pull/269

* Fix linter error

* Update encryption docs and changelog

- Mention that worker mode isn't supported with encryption yet
- Mention removal of Pantalaimon-based encryption

* Update worker docs with encryption config notice

* Share main appservice config with feed bots

This is required to safely enable encryption for the bots that post
GenericHook messages.

* Make slight clarification for queue config

* Minor fixes

* Block post-join actions on feed bot crypto setup

Same as a9e6e11d but for the sub-bots that post GenericHook messages.

* Get joined rooms from intent instead of bot

This refreshes the list of known rooms for crypto events.

* Use Element fork of bot-sdk for crypto fixes

Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
2022-12-09 10:25:36 -05:00
Will Hunt
93e2dbe7ed
Increase feed.pollTimeoutSeconds from 10s to 30s (#483)
* Increase feed.pollTimeoutSeconds from 10s to 30s

* Drop pointless default

* changelog
2022-11-25 14:46:06 +00:00
Will Hunt
63ab457b45
Refactor feed errors and error presentation (#459)
* Add support for setting a global feed timeout

* Track failures, and don't show the first non-serious error

* Tidy up error reporting

* Make a prettier error pane

* Use the prettier event pane

* Show failed feed attempts in the widget

* Ensure we catch connection resets

* Add styling file

* Ensure we only track one result per fetch

* changelog

* Refactor to use better status codes

* Make feed results cheaper

* splice
2022-08-31 14:01:43 +01:00
Andrew Ferrazzutti
d4f701c871
Disallow some empty config URL settings (#412)
* Disallow some empty config URL settings

If these settings are meant to be unspecified, then their entire parent
sections (`widgets` & `generic`) should be unspecified.

Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>

* Convert some config URL strings to URL objects

This allows both parsing and easier crafting of relative URLs.

Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>

* Dump parsed URLs to default config

Also implement getters to return stringified URLs, instead of having to
store a URL's string representation directly.

Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
2022-07-13 08:39:23 -04:00
Will Hunt
b674fff486
Disable GET for webhooks (unless configured) (#397)
* Disable GET for webhooks (unless configured)

* Docs

* newsfile

* Update Config.ts
2022-07-07 21:52:59 +00:00
Will Hunt
f56545bf7c
Add setup command for GitLab (#321)
* Cleanup gitlab auth command

* Add support for the `!hookshot gitlab project` command

* Improve docs

* changelog

* add new page

* Wording

Co-authored-by: Tadeusz Sośnierz <tadzik@tadzik.net>

* Remove useless comment

Co-authored-by: Tadeusz Sośnierz <tadzik@tadzik.net>
2022-04-26 16:04:24 +01:00
Tadeusz Sośnierz
ef91798bcb Update config defaults 2022-04-22 11:25:05 +02:00
Tadeusz Sośnierz
0b0a7f1adb Add RSS/Atom feed support 2022-04-21 15:29:26 +02:00
Will Hunt
27fc699e0e
Fix GitHub and GitLab ghost user intent creation (#303)
* Fix GitHub and GitLab ghost user intent creation, and add config

* changelog
2022-04-12 18:46:14 +01:00
Will Hunt
e1b5f989b9
Fail to start when widgets are configured without a listener (#298)
* Add note about listener configuration in widgets.md

* Add errors to check when widgets are not fully configured

* changelog

* Include widget listener in default config
2022-04-11 18:39:42 +01:00
Will Hunt
aa9e066530
Add Generic Webhooks Widget interface (#140)
* Start work on improved widget interface for admin room

* Add changes needed for InviteView

* More widget bits

* Lots more work to support setup widgets

* Redesign work

* Fix build order for web

* Remove unused invite code

* Update configs

* Cleanup

* Support widget branding

* Tidy up web app

* Support generic service config lookup

* Stronger typings for configuration

* Improve error text

* fix patch

* changelog

* First pass on documentation

* Fix tests

* fixes

* Don't require room state / admin rooms for room config requests

* Fix no render when secrets isn't provided

* rework if logic

* Fixes after feedback

* more review fixes

* Cleanup unused code

* fix indent

* Update matrix-appservice-bridge to 4.0.1

* Update widget API
2022-04-08 16:16:12 +01:00
Will Hunt
14abb011b6
Support hotlinking github issues and PRs (#277)
* Support hotlinking github issues and PRs

* changelog

* update sample config

* Update github_repo.md
2022-04-06 18:46:04 +01:00
Will Hunt
bade5be6eb
Move webhooks from / to /webhook (#227)
* Move webhooks from / to /webhooks

* fix doc

* Update docs

* Fix tests

* changelog

* Update sample config

* fixup config

* fix changelog

* commit config changes
2022-03-07 23:57:06 +00:00
Will Hunt
363d8aa02f
Refactor logging to be much more flexible and less noisy (#229)
* Add new logging config options

* Reduce logging noise

* Identify more sources of noise

* Add new colourize and json options for logging

* Update documentation

* changelog
2022-03-07 20:04:26 +00:00
Will Hunt
7837cbb0f2
Refactor JIRA to support on-prem (#187)
* JIRA refactors

* Support JIRA onprem

* Fix webhooks

* More JIRA docs --- PLEASE REWRITE MEEEE ---

* Drop manifest code for now

* Add on-prem instructions

* Remove incomplete command

* Update sample config

* Remove null url
2022-03-04 14:34:44 +00:00
Will Hunt
5b294bc05f
Add support for a tiered permission system (#167)
* Add basic permission model

* Add permission mapping implementation

* Start integrating config checks

* Add permission checking for commands

* Add warnings for legacy behaviour

* changelog

* Linting

* Fix config build step

* Tests

* Add documentation

* Add complete tests

* Add documentation

* Add room for room membership permissions

* Fixup error

* Update sampleConfig
2022-01-14 17:44:15 +00:00
Will Hunt
675456dd72
Figma Support (#105)
* Add support for Figma files

* tweaks

* Final pieces needed for support

* Documentation

* Add config check

* Support using an alternative userId for Figma (to support legacy bots)

* Reinstate key fixer

* lint
2022-01-06 17:13:58 +00:00
Will Hunt
d860b9acd1
Docs and config improvements (#124)
* Don't suggest to bind widgets in config

* Don't support 'appservice' just yet for the listener service.

* Add config validator

* Clarify listener configuration

* Improve text of webhooks docs

* Update config sample

* Revert "Add config validator"

This reverts commit b422b3da3d246f9eb1a6b47641ea4c1315252c2c.

* changelog
2022-01-04 17:49:59 +00:00
Will Hunt
060b73263f
Add a listeners config block (#102)
* Add support for a multi-resource listener style handler

* Update configs

* Speed up config check

* Speed up config check

* Update docs
2021-12-21 16:52:12 +00:00
Will Hunt
ffcb41a0e0
Add support for prometheus (#99)
* Add support for prometheus metrics

* Automatically build metrics documentation

* Slight linter tidyup

* add changelog

* fix workflow

* hush yarn
2021-12-16 15:05:03 +00:00
Will Hunt
8bdf789553
Add towncrier (#96)
* Add support for towncrier

* Use correct command

* Compare properly

* Work within the correct directory

* Try main

* Try a fetch-depth of 0

* changelog

* Fix default config

* Update sample
2021-12-13 13:10:36 +00:00
Will Hunt
6387a15c67 Update default config 2021-12-03 12:34:24 +00:00
Will Hunt
0a0f51ea75 Update config 2021-12-02 13:35:30 +00:00
Will Hunt
4604268df1 Update sample config 2021-12-01 17:25:20 +00:00
Will Hunt
d649d872bc Merge remote-tracking branch 'origin/main' into hs/provisioning 2021-12-01 10:58:46 +00:00
Will Hunt
f599618563 Update sample config 2021-12-01 10:54:47 +00:00
Will Hunt
51c8be1422 Update required bot config 2021-11-30 19:33:29 +00:00
Will Hunt
e99bcbf9b1 Merge remote-tracking branch 'origin/main' into hs/provisioning 2021-11-30 10:38:02 +00:00
Will Hunt
8b808990f8 Update sample config 2021-11-29 18:21:19 +00:00
Will Hunt
3efd2b2bd3 Update sample config 2021-11-29 16:50:19 +00:00
Will Hunt
2f994fbc81 Drop installation ID 2021-11-29 16:49:49 +00:00
Will Hunt
5630e93038 Update sample config 2021-11-25 13:30:19 +00:00
Will Hunt
6ab1f43f43 Merge remote-tracking branch 'origin/main' into hs/provisioning 2021-11-25 13:24:49 +00:00
Will Hunt
ce26efeca3 Make CI happy 2021-11-25 11:12:29 +00:00
Will Hunt
21a1731d76 Provisioning config 2021-11-24 18:56:09 +00:00
Will Hunt
8b584f2622 One more config edit 2021-11-17 14:24:32 +00:00
Will Hunt
982f5ee249 Fix config 2021-11-17 12:33:02 +00:00
Will Hunt
537352fbf3 Update default config 2021-11-17 12:29:34 +00:00
Will Hunt
8c150d4b87 Add sample config 2021-04-11 16:07:43 +01:00