* 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>
* Refactor HookFilter to only support enabledEvents (and add a function to convert)
* Convert connections to deprecate ignoreHooks
* Update documentation
* Split out EventHookCheckbox
* Refactor frontend to support enableHooks only mode
* drop old field name
* changelog
* Fix enabledHooks for widgets
* Fixes across the board
* Update test description
* Cleanup
* Fix HookFilter
* Fixup checkboxes
* Cleanup
* Add a queue system for loading connections on startup
* Retry state requests
* Add ability to retry on some matrix failures
* Add the queue
* changelog
* Add docstring
* Update config to mark encryption support as experimental
* Mention encryption as experimental in docs
* changelog
* Hide empty values from config
* transmuate snakes into camels
* 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>
* Save bot-created admin rooms in profile data
This prevents a process restart from causing bot-created admin rooms
to be forgotten.
* Clarify changelog
* Harden against unauthorized changes to room state
If an unauthorized change to connection-related room state is detected,
deny the new connection settings & attempt to revert the state change.
Also catch an otherwise-uncaught error on authentication failure.
* `any`->`unknown` for some StateEvent content types
* Limit how far back in state to look when restoring
* Explicitly drop unneeded return value of promise
* Add reason to redacted state events
* Rename & document the fn to revert room state
* Move connection state check to ConnectionManager
* Don't rollback bad room state on startup
* Allow GitLab connections without hook permissions
Warn instead of fail when connecting a GitLab project that Hookshot
cannot provision a webhook for.
* Mention manual "Secret token" for GitLab webhooks
* Refactor warning pane into a separate component
* Recolour warning pane for better contrast
* Increase SANITIZE_MAX_BREADTH/SANITIZE_MAX_DEPTH
I suspect #559 is failing because the body falls just outside our safe range. The safe ranges were chosen arbitrarily, but we can probably increase them without a huge perf penalty.
* Automatically JSONify anything exceeding the breadth or depth
* Create 560.bugfix
* Update GenericHook.ts
* Cleanup
* optimise newDepth
* Don't skip non-lowercase GitLab connection paths
Fixes#552
* Don't lower-case GitLab URLs with bot command
This allows GitLab URLs to appear in the configuration widget with their
original casing intact.
* Lowercase GitLab connection path on save
* Skip MR reply comments
* Skip comment event if filtered by events
* Use discussion IDS
* Create 536.bugfix
* Update src/Connections/GitlabRepo.ts
Co-authored-by: Christian Paul <christianp@matrix.org>
* Update src/Connections/GitlabRepo.ts
Co-authored-by: Christian Paul <christianp@matrix.org>
* Update src/Connections/GitlabRepo.ts
Co-authored-by: Christian Paul <christianp@matrix.org>
Co-authored-by: Christian Paul <christianp@matrix.org>
* Add a HookFilter class
* Use the HookFilter class
* Support default hooks in the web UI
* Update documentation
* changelog
* Allow all GitLab events by default
* bits of cleanup
* Allow multiple Jira connections; stop prefix clash
Fixes#533
Mitigates #421
* Follow review suggestions
- Set a status code for the ApiError on command prefix conflict
- Make `conflictsWithCommandPrefix` an optional method
- Support version created/updated/released events
- Look up project ID if missing when subscribing to version events
- Properly format version event notices
- Prioritize project URL over ID in debug strings
- Refactor Jira event handling to be more like GitHub & GitLab
- Fix silently-ignored Jira events due to expecting wrong type strings
- Update UI for Jira events
* Add network timeouts to Docker builds
* Split cargo build out
* Put cargo in the right place
* debug usage
* install time
* Fix docker build OOMing in CI for arm64 builds
Yoinked from synapse:
- https://github.com/matrix-org/synapse/pull/14173
- 424d1d28cc
* Update changelog
Co-authored-by: Half-Shot <will@half-shot.uk>