mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 13:17:08 +00:00

* 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>