diff --git a/src/bot.ts b/src/bot.ts index e128773c5b227b0dc2241c265316a8d56010e256..b1bbf0595446529c22b9363e7c40f14444b87d4b 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -806,7 +806,7 @@ export class DiscordBot { await Util.AsyncForEach(msg.attachments.array(), async (attachment) => { const content = await Util.DownloadFile(attachment.url); const fileMime = content.mimeType || mime.getType(attachment.filename) || "application/octet-stream"; - const mxcUrl = await this.bridge.botIntent.underlyingClient.uploadContent( + const mxcUrl = await intent.underlyingClient.uploadContent( content.buffer, fileMime, attachment.filename, diff --git a/src/usersyncroniser.ts b/src/usersyncroniser.ts index 9e046e4f833f3a795df7c11d7ffc60004e116984..5633574cedd88e703a3bcca6ce3905d72134fff7 100644 --- a/src/usersyncroniser.ts +++ b/src/usersyncroniser.ts @@ -134,7 +134,7 @@ export class UserSyncroniser { if (userState.avatarUrl !== null) { log.verbose(`Updating avatar_url for ${userState.mxUserId} to "${userState.avatarUrl}"`); const data = await Util.DownloadFile(userState.avatarUrl); - const avatarMxc = await this.bridge.botIntent.underlyingClient.uploadContent( + const avatarMxc = await intent.underlyingClient.uploadContent( data.buffer, data.mimeType, userState.avatarId,