Skip to content

Conversation

@Half-Shot
Copy link
Contributor

Closes #390

Matrix is moving to a new model for events where by messages no longer contain one representation, but a series of fallbacks (known as extensible events) so that applications can choose the best representation.

The bridge sdk will make use of the matrix-events-sdk to automatically parse and represent these events, and then use a new controller callback to emit these events. This is currently unstable, and so bridges need to explicitly opt in to this behavior to use it.

See https://github.com/matrix-org/matrix-events-sdk#readme
See matrix-org/matrix-spec-proposals#1767

@Half-Shot Half-Shot requested a review from a team February 16, 2022 12:59
*/
public newRequest<T>(opts?: RequestOpts<T>) {
const req = new Request(opts || {data: null});
public newRequest<T, R extends unknown>(opts?: RequestOpts<T>): Request<T, R> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: does R extends unknown do anything more than a regular R?

@tadzik
Copy link
Contributor

tadzik commented Feb 17, 2022

Looks good: do we have any bridge currently making use of this, so we can see how the API works out in practice?

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.

Emit extensible events via matrix-events-sdk

3 participants