WIP: feature: threads'n'forums #74

Draft
Guzio wants to merge 109 commits from Guzio/out-of-your-element:mergable-fr-fr into main
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 0c6a5008e3 - Show all commits

View file

@ -195,7 +195,7 @@ async function channelToKState(channel, guild, di) {
if (hasCustomTopic) delete channelKState["m.room.topic/"] if (hasCustomTopic) delete channelKState["m.room.topic/"]
// Make voice channels be a Matrix voice room (MSC3417) // Make voice channels be a Matrix voice room (MSC3417)
if (channel.type === DiscordTypes.ChannelType.GuildVoice) { if (channel.type === DiscordTypes.ChannelType.GuildVoice || channel.type === DiscordTypes.ChannelType.GuildStageVoice) {
creationContent.type = "org.matrix.msc3417.call" creationContent.type = "org.matrix.msc3417.call"
channelKState["org.matrix.msc3401.call/"] = { channelKState["org.matrix.msc3401.call/"] = {
"m.intent": "m.room", "m.intent": "m.room",

View file

@ -112,7 +112,7 @@ function getChannelRoomsLinks(guild, rooms, roles) {
let unlinkedChannelIDs = channelIDs.filter(c => !linkedChannelIDs.includes(c)) let unlinkedChannelIDs = channelIDs.filter(c => !linkedChannelIDs.includes(c))
/** @type {DiscordTypes.APIGuildChannel[]} */ // @ts-ignore /** @type {DiscordTypes.APIGuildChannel[]} */ // @ts-ignore
let unlinkedChannels = unlinkedChannelIDs.map(c => discord.channels.get(c)) let unlinkedChannels = unlinkedChannelIDs.map(c => discord.channels.get(c))
let removedWrongTypeChannels = dUtils.filterTo(unlinkedChannels, c => c && [0, 5].includes(c.type)) let removedWrongTypeChannels = dUtils.filterTo(unlinkedChannels, c => c && [0, 2, 5, 13, 15, 16].includes(c.type))
let removedPrivateChannels = dUtils.filterTo(unlinkedChannels, c => { let removedPrivateChannels = dUtils.filterTo(unlinkedChannels, c => {
const permissions = dUtils.getPermissions(guild.id, roles, guild.roles, botID, c["permission_overwrites"]) const permissions = dUtils.getPermissions(guild.id, roles, guild.roles, botID, c["permission_overwrites"])
return dUtils.hasSomePermissions(permissions, ["Administrator", "ViewChannel"]) return dUtils.hasSomePermissions(permissions, ["Administrator", "ViewChannel"])