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 189ea7e769 - Show all commits

View file

@ -36,7 +36,7 @@ async function bridgeThread(event) {
catch (e){ catch (e){
if (e.message?.includes("50024")){ //see: https://docs.discord.com/developers/topics/opcodes-and-status-codes if (e.message?.includes("50024")){ //see: https://docs.discord.com/developers/topics/opcodes-and-status-codes
api.sendEvent(event.room_id, "m.room.message", { api.sendEvent(event.room_id, "m.room.message", {
body: "Hey, please don't do that! This room is already a thread on Discord - trying to embed threads inside it will not work. DC users will just see a regular reply, which is distracting and also probably not what you want.", body: "Hey, please don't do that! This room is already a thread on Discord (or it could also be a voice-chat or something adjacent) - trying to embed threads inside it, like you just did, will not work. DC users will just see a regular reply, which is distracting and also probably not what you want.",
"m.mentions": { "user_ids": [event.sender]}, "m.mentions": { "user_ids": [event.sender]},
"m.relates_to": { "m.relates_to": {
event_id: threadEventID, event_id: threadEventID,

View file

@ -310,7 +310,7 @@ const commands = [{
if (err?.includes("50024")) return api.sendEvent(event.room_id, "m.room.message", { if (err?.includes("50024")) return api.sendEvent(event.room_id, "m.room.message", {
...ctx, ...ctx,
msgtype: "m.text", msgtype: "m.text",
body: "You cannot create threads in a Discord channel of the type, to which this Matrix room is bridged to. Did you try to create a thread inside a thread?" body: "You cannot create threads in a Discord channel of the type, to which this Matrix room is bridged to. It could be something like a VC, or perhaps... Did you try to embed a thread inside a thread, silly?"
}) })
if (err?.includes("50035")) return api.sendEvent(event.room_id, "m.room.message", { if (err?.includes("50035")) return api.sendEvent(event.room_id, "m.room.message", {
...ctx, ...ctx,