diff --git a/d2m/actions/create-room.js b/d2m/actions/create-room.js index 322f8be9..2dd62e01 100644 --- a/d2m/actions/create-room.js +++ b/d2m/actions/create-room.js @@ -120,8 +120,7 @@ async function channelToKState(channel, guild) { if (customAvatar) { avatarEventContent.url = customAvatar } else if (guild.icon) { - avatarEventContent.discord_path = file.guildIcon(guild) - avatarEventContent.url = await file.uploadDiscordFileToMxc(avatarEventContent.discord_path) // TODO: somehow represent future values in kstate (callbacks?), while still allowing for diffing, so test cases don't need to touch the media API + avatarEventContent.url = {$url: file.guildIcon(guild)} } let history_visibility = PRIVACY_ENUMS.ROOM_HISTORY_VISIBILITY[privacyLevel] diff --git a/d2m/actions/create-space.js b/d2m/actions/create-space.js index b15cba6a..a9b8448d 100644 --- a/d2m/actions/create-space.js +++ b/d2m/actions/create-space.js @@ -65,7 +65,6 @@ async function guildToKState(guild, privacyLevel) { "m.room.name/": {name: guild.name}, "m.room.avatar/": { $if: guild.icon, - discord_path: file.guildIcon(guild), url: {$url: file.guildIcon(guild)} }, "m.room.guest_access/": {guest_access: createRoom.PRIVACY_ENUMS.GUEST_ACCESS[privacyLevel]}, diff --git a/d2m/actions/create-space.test.js b/d2m/actions/create-space.test.js index b1c1f068..c4111dbd 100644 --- a/d2m/actions/create-space.test.js +++ b/d2m/actions/create-space.test.js @@ -14,7 +14,6 @@ test("guild2space: can generate kstate for a guild, passing privacy level 0", as await kstateUploadMxc(kstateStripConditionals(await guildToKState(testData.guild.general, 0))), { "m.room.avatar/": { - discord_path: "/icons/112760669178241024/a_f83622e09ead74f0c5c527fe241f8f8c.png?size=1024", url: "mxc://cadence.moe/zKXGZhmImMHuGQZWJEFKJbsF" }, "m.room.guest_access/": { diff --git a/test/data.js b/test/data.js index 771c1830..456033a3 100644 --- a/test/data.js +++ b/test/data.js @@ -38,8 +38,7 @@ module.exports = { }] }, "m.room.avatar/": { - discord_path: "/icons/112760669178241024/a_f83622e09ead74f0c5c527fe241f8f8c.png?size=1024", - url: "mxc://cadence.moe/zKXGZhmImMHuGQZWJEFKJbsF" + url: {$url: "/icons/112760669178241024/a_f83622e09ead74f0c5c527fe241f8f8c.png?size=1024"} }, "m.room.power_levels/": { events: {