41 Commits

Author SHA1 Message Date
Will Hunt
819c089aa4
Update minimum Node version to 22 (#990)
* 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)
2024-11-28 15:04:01 +00:00
dependabot[bot]
7083534b7b
Bump openssl from 0.10.64 to 0.10.66 (#968)
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.64 to 0.10.66.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.64...openssl-v0.10.66)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-15 11:29:14 +01:00
Half-Shot
ab918bd293 5.3.0
amend changelog
2024-04-17 11:19:12 +01:00
Will Hunt
cf689919a4
Fix tokens encrypted with Node crypto implementation being undecryptable in new Rust implementation. (#930)
* Encrypt with new padding algo when possible.

* formatting

* changelog
2024-04-17 10:00:00 +00:00
Will Hunt
6482c7ed55
Handle RSA token handling in Rust (#915)
* 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>
2024-04-08 15:22:57 +01:00
dependabot[bot]
6618ab6db8
Bump h2 from 0.3.24 to 0.3.26 (#922)
Bumps [h2](https://github.com/hyperium/h2) from 0.3.24 to 0.3.26.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.26/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.24...v0.3.26)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 14:04:13 +01:00
dependabot[bot]
4c3e7540b6
Bump mio from 0.8.10 to 0.8.11 (#909)
Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.10 to 0.8.11.
- [Release notes](https://github.com/tokio-rs/mio/releases)
- [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/mio/compare/v0.8.10...v0.8.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-06 14:05:41 +00:00
Half-Shot
b8d33f42bb 5.2.1 2024-03-04 14:31:30 +00:00
Half-Shot
609347966e Update cargo 2024-02-21 14:20:03 +00:00
Will Hunt
387f7c1ce9
Backoff failing RSS feeds (#890)
* 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
2024-02-20 22:21:19 +00:00
dependabot[bot]
ee7e3ff03f
Bump h2 from 0.3.22 to 0.3.24 (#885)
Bumps [h2](https://github.com/hyperium/h2) from 0.3.22 to 0.3.24.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.24/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.22...v0.3.24)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-06 09:36:12 +00:00
Half-Shot
0175f9e2a5 5.1.2
Bugfixes
--------

- Fix widget pinning to light theme. ([\#873](https://github.com/matrix-org/matrix-hookshot/issues/873))
- Fix hookshot failing to format API errors.
  Only log a stacktrace of API errors on debug level logging, log limited error on info. ([\#874](https://github.com/matrix-org/matrix-hookshot/issues/874))
- Fix GitHub events not working due to verification failures. ([\#875](https://github.com/matrix-org/matrix-hookshot/issues/875))

Internal Changes
----------------

- Fix spelling of "successfully". ([\#869](https://github.com/matrix-org/matrix-hookshot/issues/869))
2024-01-02 16:09:04 +00:00
Half-Shot
6a23dc7854 5.1.1 2023-12-29 16:17:13 +00:00
Half-Shot
445be6e78c 5.1.0 2023-12-29 12:19:15 +00:00
Half-Shot
67dfa448c5 5.0.0 2023-12-27 22:01:24 +00:00
Will Hunt
b96b45d98c
Drop Node 18, start testing Node 21 & update dependencies. (#862)
* Major package upgrades

* Update rust deps and fix a few things

* Drop 18 testing

* Use node 20

* lint rust

* lint

* changelog

* Drop usage of SVGs, use compound elements.

* Update widget API
2023-12-22 15:36:49 +00:00
Will Hunt
2a4b06bdbd
Use node:20-slim for Docker (#849)
* Use node:20-slim

* Add curl

* Lint

* retrigger

* Update stale cargo deps

* Update axios

* Add pkg-config and remove stale comment

* changelog

* Add openssl dep

* Add libssl-dev
2023-12-06 10:28:52 +00:00
dependabot[bot]
f8c2f92051
Bump openssl from 0.10.57 to 0.10.60 (#847)
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.57 to 0.10.60.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.57...openssl-v0.10.60)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 11:37:38 +00:00
Andrew Ferrazzutti
e808002ad7 4.6.0 2023-11-20 11:14:52 -05:00
Andrew Ferrazzutti
4a1c449154
Update release script (#819)
* Update releaser script to check Cargo.toml version

* Update releaser script to check Cargo.lock version

* Update Cargo.toml/lock

* Let releaser script show actual branch to be on

* Echo releaser script errors to stderr

* Use unique exit codes for releaser script errors

* Add changelog
2023-09-26 21:15:14 +00:00
Will Hunt
38c34b671b
Update bot-sdk to 0.6.7-element-1 (#814)
* Update to bot-sdk 0.6.7-1

* Update cargo dependencies

* changelog
2023-09-11 13:37:17 +00:00
Andrew Ferrazzutti
958743365f
Update Cargo.lock (#803)
* Update Cargo.lock

* Changelog

* Update Cargo.toml
2023-08-04 13:11:25 +00:00
Will Hunt
3217b9eecf
Performance improvements to Feeds (#786)
* 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
2023-06-28 15:29:54 +00:00
Will Hunt
466ab6d5e3
Allow sanitized HTML from feed summaries (#738)
* 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>
2023-05-18 18:59:58 +00:00
Will Hunt
43176adf7a
Fallback to parsing feeds as atom format if rss format fails. (#721)
* 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
2023-04-25 15:45:55 +00:00
Will Hunt
eda6fc8c26
Use rss crate for RSS feed parsing (#709)
* Refactor annoying type difference

* Add rss

* Add support for parsing RSS feeds

* Add rss lib

* Add Cargo project

* Lint rust

* changelog

* Add support for new fields
2023-04-17 11:48:03 +00:00
Andrew Ferrazzutti
66a5d8bb57 1.8.1 2022-07-19 11:50:01 -04:00
Half-Shot
ded8be55e2 1.8.0 2022-07-11 18:13:10 +01:00
Will Hunt
c68bcafeb6
Automatically reconfigure GitHub notifications when a token is updated. (#388)
* Refactor methods

* changelog

* Tweaks
2022-07-11 17:08:09 +00:00
Half-Shot
a665d3b949 1.7.2 2022-06-08 16:51:57 +01:00
dependabot[bot]
a53400c132
Bump regex from 1.5.4 to 1.5.6 (#368)
Bumps [regex](https://github.com/rust-lang/regex) from 1.5.4 to 1.5.6.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.5.4...1.5.6)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-07 12:13:54 +01:00
Half-Shot
ab4cabbd67 1.3.0 2022-03-30 12:04:47 +01:00
Half-Shot
de2528e75b Fix cargo lock 2022-03-30 11:40:31 +01:00
Will Hunt
632791be63
Refactor setup commands (#141)
* Ensure setup connection uses provisionConnection function

* Drop unused parameters from JiraProjectConnection

* Fix typo

* Convert ApiErrors into CommandError when possible

* Fix a stray bug

* changelog
2022-01-10 21:10:14 +00:00
Will Hunt
e6dd83ac5b
Support napi v2 (#111)
* Export a sensible user agent

* Completely rewrite rust portions to be napi v2 compatible

* Format rust files

* Only lint TS files when running lint-node

* Don't include autogenerated typings in the tree

* changelog

* Autofix generated rust dependencies due to a bug in napi@2

* Fix for multiple runs

* Fix format_util file name

* Make script generic

* lint
2022-01-02 01:54:57 +00:00
Will Hunt
b6e37947bd Refactor code to use BaseConnection and make the connectionIds simpler 2021-12-02 12:34:43 +00:00
Will Hunt
40a75fa4d3 Rename project 2021-11-22 16:02:07 +00:00
Will Hunt
933dd498af Lint 2021-11-22 11:15:47 +00:00
Will Hunt
9748fe09cf More tweaking 2021-11-21 16:51:04 +00:00
Will Hunt
175a2c592e Package tweaks 2021-11-21 13:21:58 +00:00
Will Hunt
39c6e81cbb Lots of changes 2021-11-21 12:34:56 +00:00