* Allow room admins to import other people's go-neb services
This requires us to guess what these other people's MXIDs were,
so we scroll through the list of room members and make educated guesses
about which of them are Scalar+go-neb bots, and which users they were set up by.
* Relax our requirements for scraping others' go-neb connections
* Changelog
* Linting
---------
Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
* Make sure we're not treating garbage data in feed item as guids
Some of these would parse as `{ '$': { isPermaLink: 'false' } }` or similar,
which would then surprise us very much when assuming that it's a string stored in accountData.
* Changelog
* Exclude empty strings when looking for viable guids
Co-authored-by: Christian Paul <christianp@matrix.org>
* Hash seen feed entry guids for storing and checking
This saves a little bit of space in the common case,
and prevents bloating the storage were someone to feed us obnoxiously long guids.
---------
Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
Co-authored-by: Christian Paul <christianp@matrix.org>
* Add an ensureJoined to assertUserPermissions
* Ensure web component retries connection fetches
* Ensure errors are caught and logged as JSON on the widget API
* changelog
* non-linear retry timer
* lint
* Use retry
* Make getBotUserInRoom try to join the room
* Make this fn safe to handle
* When setting up a FeedConnection, check if the feed loads and parses rather than just checking the Content-Type
* Don't create a new Parser each time we fetch a feed
* Create 684.bugfix
---------
Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
Co-authored-by: Will Hunt <will@half-shot.uk>
* Undo XML parser customizations
These did more harm then good, breaking many legit feeds in weird ways.
* Undo changelog
---------
Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
Co-authored-by: Will Hunt <will@half-shot.uk>
* 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
* Add a go-neb migrator, capable of migrating RSS/Atom feeds to hookshot (so far)
* Add forgotten file
* Fix useCallback() usage
* Gracefully handle go-neb not being configured
* Make Feed URLs not editable when they're being migrated over from go-neb
https://github.com/matrix-org/matrix-hookshot/pull/647#discussion_r1131615944
* Changelog
* Linting
* Add the ability to migrate Github repo connections from go-neb (#651)
* Add the ability to migrate Github repo connections from go-neb
* Gracefully handle the lack of go-neb migrator
---------
Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
* Handle Scalar-style go-neb service IDs (#656)
* Add the ability to migrate Github repo connections from go-neb
* Handle Scalar-style go-neb service IDs
* Make service type in service ID match the Scalar-generated one
https://github.com/matrix-org/matrix-hookshot/pull/656#discussion_r1131647595
* Safeguard against undefined hardcoded service IDs
https://github.com/matrix-org/matrix-hookshot/pull/656#discussion_r1131646578
* Rename a variable
https://github.com/matrix-org/matrix-hookshot/pull/656#discussion_r1131710225
---------
Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
* Linting
---------
Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
* 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>
* Implement new Dropdown component
* Apply field styling to search too
* General improvements to GitLabClient
* Add support for storing small base64 files in the storage provider
* Refactor GitLab repo to use new connection provider
* Start trying to deduplicate code
* Begin refactor to support ConnectionSearch
* Add support for GitHub searching
* Refactor GitLab/GitHub into components
* Port Jira to ConnectionSearch
* Drop unused functions
* Hide connection list if no connections are present.
* Cleanups
* Cleanup abort controller
* changelog
* Update JIRA for search powers
* 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