Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hs/update express #354

Closed
wants to merge 133 commits into from
Closed

Conversation

Half-Shot
Copy link
Contributor

Prevents

node_modules/@types/express-serve-static-core/index.d.ts:589:18 - error TS2430: Interface 'Response<ResBody, Locals, StatusCode>' incorrectly extends interface 'ServerResponse<IncomingMessage>'.
  Property 'req' is optional in type 'Response<ResBody, Locals, StatusCode>' but required in type 'ServerResponse<IncomingMessage>'.

589 export interface Response<
                     ~~~~~~~~

node_modules/@types/express/index.d.ts:58:55 - error TS2344: Type 'Response<any, Record<string, any>>' does not satisfy the constraint 'ServerResponse<IncomingMessage>'.
  Property 'req' is optional in type 'Response<any, Record<string, any>>' but required in type 'ServerResponse<IncomingMessage>'.

58     var static: serveStatic.RequestHandlerConstructor<Response>;
                                                         ~~~~~~~~

AndrewFerr and others added 30 commits December 8, 2022 21:34
Ensure that the bot has all keys needed for sharing a room key with
recipients before encryping an event in that room.

Signed-off-by: Andrew Ferrazzutti <[email protected]>
* Handle pre-shared invite keys

Signed-off-by: Andrew Ferrazzutti <[email protected]>

* Use assignment for changes to membership array

* Catch member lookup errors in prepareEncrypt

Treat an error in looking up room members of a particular membership
type as there being no members of that type.

Return early if no members are found.

* Resolve conflict on `members` variable

Signed-off-by: Andrew Ferrazzutti <[email protected]>
We'd like to disable the LRU to tempoarily workaround some caching issues, which requires us to be able to set the values of maxAgeMs/maxCached to `0`.
We'd like to disable the LRU to tempoarily workaround some caching
issues, which requires us to be able to set the values of
maxAgeMs/maxCached to `0`.
Includes v0.6.4+patches (not yet released as v0.6.5 upstream)
…e#314)

* Fix key query and claim APIs to support async functionality

* fix copy/paste fail
Signed-off-by: Andrew Ferrazzutti <[email protected]>
Signed-off-by: Andrew Ferrazzutti <[email protected]>
Signed-off-by: Andrew Ferrazzutti <[email protected]>
Run all tests with both the Sled and SQLite store types

Signed-off-by: Andrew Ferrazzutti <[email protected]>
Signed-off-by: Andrew Ferrazzutti <[email protected]>
Signed-off-by: Andrew Ferrazzutti <[email protected]>
#39)

We need this for specific situations where a bot is joined to a LOT of
rooms, but the encrypted rooms are in the minority.

This should:
 - Cache rooms that explicitly do not have a encryption state event.
 - Recheck every time we see an encryption state event.

## Checklist

* [ ] Tests written for all new code
* [ ] Linter has been satisfied
* [ ] Sign-off given on the changes (see CONTRIBUTING.md)
The intention here is to handle things when thousands of requests are
made to add tracked users and the async lock gets dogpiled. Async lock
has a (sensible) limit of 1000 acquires before it gives up, so I think
we should just queue up requests in a big batch and handle them like so.

## Checklist

* [ ] Tests written for all new code
* [ ] Linter has been satisfied
* [ ] Sign-off given on the changes (see CONTRIBUTING.md)
… appservice events (#41)

This PR changes the way we pick a client for decrypting an event, and
caches the result so that it can be reused. This is intended to ensure
that when the sender user isn't used for decryption, Appservice doesn't
make repeated calls to get_joined_rooms, and when it picks a client it
prefers one with encryption already enabled to save time.

We also update to ES2022 so I can use Error.cause, one of my favourite
new ES features.

## Checklist

* [ ] Tests written for all new code
* [ ] Linter has been satisfied
* [ ] Sign-off given on the changes (see CONTRIBUTING.md)
<!-- Thanks for submitting a PR! Please ensure the following
requirements are met in order for us to review your PR -->

## Checklist

* [ ] Tests written for all new code
* [ ] Linter has been satisfied
* [ ] Sign-off given on the changes (see CONTRIBUTING.md)
@Half-Shot
Copy link
Contributor Author

(err, wrong branch)

@Half-Shot Half-Shot closed this Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants