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

Use the matrix-bot-sdk for Matrix API calls #326

Merged
merged 27 commits into from
Aug 16, 2021
Merged

Use the matrix-bot-sdk for Matrix API calls #326

merged 27 commits into from
Aug 16, 2021

Conversation

Half-Shot
Copy link
Contributor

This PR moves us away from matrix-js-sdk to the matrix-bot-sdk. The advantages for which are:

  • The bot-sdk is focused on bots and bridges, rather than clients.
  • The bot-sdk is fully typed
  • The bot-sdk includes existing support for appservices, which we could later use to further reduce our code footprint.

This PR only aims to default to using the matrix-bot-sdk Intent/Client object by default for Matrix API calls (inside Intent and otherwise). It does NOT attempt to replace the appservice logic such as handling incoming events, which might be solved via a future PR.

Great pains have been taken to be API compatible, where intent functions have kept the same signature and compatibility code has been added in places. In addition, we've kept the ability to dynamically create matrix-js-sdk instances via getClient as historically bridges use a mix of Intent and Client functions.

However, upon merging this PR we will release a v3.0.0 of the library to make it an explicit upgrade choice by bridge developers.

@Half-Shot Half-Shot self-assigned this Aug 5, 2021
@jaller94 jaller94 self-requested a review August 9, 2021 15:56
changelog.d/326.feature Outdated Show resolved Hide resolved
src/components/intent.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@jaller94 jaller94 left a comment

Choose a reason for hiding this comment

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

Besides the comments I've added, this looks good to me.

src/bridge.ts Outdated Show resolved Hide resolved
@Half-Shot Half-Shot merged commit e1991f1 into develop Aug 16, 2021
@jaller94 jaller94 deleted the hs/bot-sdk branch November 15, 2022 12:40
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.

2 participants