* Update dependencies
* Node 22 is now the new minimum version.
* changelog.
* Begin porting eslint to new config format.
* Make linter happy.
* Update reqwest to fix SSL issue?
* Fix test types
* quick check on ubuntu LTS 24.04
* Change cache key
* update rust action
* revert mocha due to esminess
* Remove the only usage of pqueue
* Use babel for TS transformations to get around ESM import bug.
* Dependency bundle upgrade
* Drop babel, not actually used.
* lint
* lint
* update default config (mostly sections moving around)
* Deprecate legacy sled store
* Add e2ee test
* Add support for e2ee testing in e2e environment
* Tidy up redis support
* Attempt to get test working
* cleanup test
* opportunistic lint
* tiny bit of cleanup
* remove ref
* tweak to homerunner
* switch to nightly images for Synapse (to test E2EE)
* use nightly
* newsfile.
* Update bot sdk to support authenticated media (now that Synapse requires it)
* fix typings
* MatrixError
* one more
* Graduate the encryption property to stable.
* update test config
* Update encryption docs.
* fix some old config bits
* Add logic to enable generic hook expiry
* Add storage for hook expiry warnings.
* Migrate generic hooks / add expiry field
* Allow reporting a specific error and status code for generic webhooks
* Report the specific error when a message fails to send
* Refactor input class to better support datetime
* Remove single use of innerChild
* Add UI support for expiry configuration
* Add new packages
* Add warnings when the timer is about to expire.
* Add send expiry notice config option
* lint
* document new option s
* Fixup test
* Add tests for expiry
* Add textual command for setting a duration on a webhook.
* Add e2e test for inbound hooks.
* changelog
* Add a configuration option to force webhooks to expire.
* update config.sample.yml
* fix field not working
* 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
* move UserTokenStore.ts
* Port all the imports to new path.
* Port RSA handling to rust.
* Add tests.
* linting
* lint rust
* Remove unwraps / panics
* fix build script
* Ensure we store and check with algorithm and key was used.
* quieten false deadcode warnings
* changelog
* fix test imports
* lazy mock out UTS
* Refactor so that UserTokenStore is initiated by the time Bridge is created.
* update defaults
* replace if with match
* Use the magic of ?
* fmt
---------
Signed-off-by: Will Hunt <will@half-shot.uk>
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
* Ensure atom feeds hash and prefix
* Add some fixing code for this.
* Remove feed fixer
* Refactor RSS feed tests a bit
* Add tests to ensure hashes do not change
* changelog
* Backoff RSS requests if a url repeatedly fails.
* Increase max backoff time to a day
* Add backoff for failing feeds.
* Remove unused finally
* Add this.feedLastBackoff
* Rewrite in rust.
* linting
* pop
* Optimise backoff function further
* Drop only!
* fix test
* lint
* lint further
* Better comments
* Fix urls calculation
* Remove testing URL
* Add some variance to speed up while loop
* correct comment
* Follow the advice and use a VecDeque as it's slightly faster.
* Vastly better shuffle method
* Speed up checking for previous guids.
* fix hasher function
* lint
* Content doesn't need to be calculated twice.
* Slightly more efficient iteration
* Improve performance of backoff insertion
* Configure feed reader
* lint
* Ensure appending and removing from the queue works as expected.
* Ensure we do keep urls that have been removed.
* lint
* Inc/dec metrics as queue items are added/deleted.
* Add comment
* tidy up
* Ensure connection state always explicitly states all keys, even if some are undefined.
* changelog
* Fix type
* fix test types
* Add support for E2E testing
* Add CI job for e2e test
* Ensure integration test only runs when regular tests complete
* Add homerunner image
* Disallow concurrent runs
* Add concurrency to other expensive steps
* changelog
* Fix mq test
* Cache rust deps
* Drop only
* Use a shared key
* quickjs test
* Replace vm2 with quickjs
* initalise -> initialise
* Remove unused transformation timeout time
* Don't assume quickModule is set
Also use whether it's set as the indicator of whether transformation
functions are allowed, instead of checking the config
* Refactor GenericHookConnectionState validation
- Do it in the constructor instead of in callers
- Make hookId mandatory so as to not drop it on some state updates
- Conflate a state event's state key with a connection state's name,
which was already the case in practice
* Refactor validateState
* Drop explicit any
Better to infer the type instead
* Always validate transformation fn
* Fix test
* Add changelog
* Fix disposal, validation, and printing
* Fix transformation error string formatting
Also refactor similar code
* Let invalid transformations run & fail
instead of pretending that one was never set
* Restore transformation timeout time
* Don't execute transformation fn when validating it
Instead, only compile it
* Revert unrelated changes
---------
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
* 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>
* Various smaller changes
* Drop account data entirely
* Use max feed items
* Commit known working improvements
* Better status handlingh
* changelog
* Update changelog
* Add a note on Redis.
* Add proper HTTP tests
* Linty lint
* Tweaks
* New metrics woah
* Tweaks
* Add a function to sanitize html output
* Allow some HTML in feed messages
* Update cargo
* changelog
* lint
* Saved a ton of code by just using ruma.
* Reverse order of rs:apply
* Lint
* Update src/Connections/FeedConnection.ts
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
* Apply suggestions from code review
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
* Add a test for partial html
---------
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
* Support atom feeds in rust parser
* Add an apply linting command
* Add changelog
* Fixup
* Add tests for atom feeds + remove redundant code
* Remove unused rss-parser
* Tests for all formats.
* Move hashing logic into rust to save cross-context calls
* lint my rust
* Use a String::from
* Ensure guids are not repeated
* Don't process feed/item titles that aren't actually strings
Another case of empty-tag with attributes, these would occasionally parse
into non-string objects and make us crash when trying to stripHtml on them.
* Changelog
* Add tests for not-quite-empty <title> tags in feeds
---------
Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
* Add support for specifying a template for feeds
* Remove unused params
* use the correct url
* make URL visible.
It was annoying me
* Update src/Connections/FeedConnection.ts
Co-authored-by: Tadeusz Sośnierz <tadzik@tadzik.net>
* Support migrations
* Hopefully support migrations now
* lint
---------
Co-authored-by: Tadeusz Sośnierz <tadzik@tadzik.net>
* Add support for checking connection grants
* Make this less noisy
* Remove import
* Trying to generic-ize the grant system
* Implement for Figma
* More grant reformatting
* Add tests
* changelog
* Fix todo
* Refactor grants
* Add logging to grant checkers
* Ensure we provide a sender
* WIP
* Update vite
* Add oauth landing page
* Add API support for GitHub oauthing
* Remove console.logs
* Add support for logging and and out of GitHub
* Add bridge API methods
* Add base link styling
* Sugar syntax main get
* Update vite
* changelog
* Review changes
* Use instance to match UI
* lint
---------
Co-authored-by: Justin Carlson <justinc@element.io>
* Fix generic webhook 'user is already in the room error'
* Add changelog
* Cleanup to support usecases without slamming the homeserver.
* Fix fallthrough
* Add some tests
* Add tests for intentutils
* Refactor the rest of the app
Co-authored-by: Half-Shot <will@half-shot.uk>
* 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 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
* More json logger safety
* Don't log undefined
* typo
* Split out the static logger to it's own class for testing
* Refactor logger usage slightly
* Add a test for the logger wrapper
* changelog
* Update LogWrapper.ts
* Drop ?
* Add Admin command from listing and disconnecting connections
(Only lists Github for now).
* Require connectionManager permissions to manipulate connections
Gives connection management its own config section and switches
AdminRoom categories to be enums.
* Fail more descriptively if connectionManager is not up in time for adminRoom
* Fix Github API URLs (#366)
* Fix Github API URLs
* Add changelog entry
* Fixes
* Tidyup
Co-authored-by: Will Hunt <will@half-shot.uk>
Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
* Fix URLs *again*
* Block private repos from being publically bridged
* Ensure check looks at service type
* Finish up deleting connections impl
Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
Co-authored-by: Will Hunt <will@half-shot.uk>
* 1.6.1
* Add new error type for validation errors
* Validate state for GitHubRepo properly
* Add tests to check labels
* Also check GitLab repo
* changelog
* add mock store
* remove nullable
* Be less strict for existing state
* Improve test coverage
* Improve expect error text
* ValidationApiError now takes falsey objects and errors on them
* Remove UserTokenMockStore
* Actually commit the new tests
* Whoops we need to include github
* Statically define connection creation and provisioing
* Tidy up
* Drop JIRA
* Convert other connections to new system
* Small linting fixes
* Fixes
* changelog
* Fix bridge
* Fix JIRA instance naming
* Fix JIRA config
* Drop unnessacery check
* 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