* 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 node 20, drop node 16
* Update workflow versions
* Update backendmeta
* Use version file
* Update packages
* Yarn updates
* Changelog
* Fix glibc compatibility
* Target es2021
Without this, CI tests fail
* Drop unused metrics parameter
* Revert "Drop unused metrics parameter"
This reverts commit 4d874549bcec3dea0d6941215ac5c4f4707966ac.
* Make a note about broken support
---------
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
* Allow usage of the SQLite-based crypto store
Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
* Add changelog
* Log when crypto storage is initialized
* Add yarn script for resetting crypto state
Also document its usage & when it may be necessary to use it.
* Minor style improvements
- add trailing semicolons
- remove redundant `Promise.resolve`s
* Change logging in crypto reset script
- Move error object to parameter
- Rename logger
* Add method to close the Redis store
and call it to let the process exit cleanly
* Update matrix-bot-sdk
Use release with SQLite crypto store support
---------
Signed-off-by: Andrew Ferrazzutti <andrewf@element.io>
* 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 hookshot_ prefix on all metrics
* Only add prefix to hookshot specific metrics
* Add old metric names as deprecated
* Fix feeds metrics names
* Update metrics docs
---------
Co-authored-by: Will Hunt <will@half-shot.uk>
* 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>
* 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>