Skip to content

Commit dfefdee

Browse files
committed
Update matrix-appservice-bridge
Update `matrix-appservice-bridge` to fix `IO.ELEMENT.MSC4190.M_APPSERVICE_LOGIN_UNSUPPORTED` error with MSC4190 enabled homeservers. A few await's needed as either the methods are now async OR we were previously trying to feed promises into strings.
1 parent 266723a commit dfefdee

File tree

6 files changed

+314
-47
lines changed

6 files changed

+314
-47
lines changed

changelog.d/371.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update `matrix-appservice-bridge` to fix `IO.ELEMENT.MSC4190.M_APPSERVICE_LOGIN_UNSUPPORTED` error with MSC4190 enabled homeservers.

changelog.d/371.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update required Node version to 22.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"leven": "^3.0.0",
4040
"marked": "^11.1.1",
4141
"nedb": "^1.8.0",
42-
"matrix-appservice-bridge": "^10.2.1",
42+
"matrix-appservice-bridge": "^11.1.0",
4343
"pg": "8.11.3",
4444
"prom-client": "^15.1.0",
4545
"quick-lru": "^5.0.0"

src/AutoRegistration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export class AutoRegistration {
200200
try {
201201
profile = await intent.getProfileInfo(mxId);
202202
if (profile.avatar_url) {
203-
profile.avatar_url = intent.matrixClient.mxcToHttpThumbnail(profile.avatar_url, 128, 128, "crop");
203+
profile.avatar_url = await intent.matrixClient.mxcToHttpThumbnail(profile.avatar_url, 128, 128, "crop");
204204
}
205205
} catch (ex) {
206206
// Appservice bots don't usually have profiles.

src/xmppjs/ServiceHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ export class ServiceHandler {
313313
if (avatar) {
314314
return avatar;
315315
}
316-
const thumbUrl = intent.matrixClient.mxcToHttpThumbnail(
316+
const thumbUrl = await intent.matrixClient.mxcToHttpThumbnail(
317317
avatarUrl, 256, 256, "scale"
318318
);
319319
if (!thumbUrl) {

0 commit comments

Comments
 (0)