From 3f7a7aa10f875d6324cc8eb151614faacb990c38 Mon Sep 17 00:00:00 2001 From: Guzio Date: Thu, 26 Feb 2026 15:37:17 +0000 Subject: [PATCH 1/2] handled overyapping --- src/matrix/matrix-command-handler.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/matrix/matrix-command-handler.js b/src/matrix/matrix-command-handler.js index bd9ecfe..761d299 100644 --- a/src/matrix/matrix-command-handler.js +++ b/src/matrix/matrix-command-handler.js @@ -298,6 +298,7 @@ const commands = [{ if (words.length < 2){ words[1] = (await api.getEvent(event.room_id, attachedToEvent)).content.body + words[1] = words[1].length < 100 ? words[1] : words[1].slice(0, 96) + "..." if (isFallingBack) return api.sendEvent(event.room_id, "m.room.message", { ...ctx, msgtype: "m.text", @@ -335,7 +336,14 @@ const commands = [{ return api.sendEvent(event.room_id, "m.room.message", { ...ctx, msgtype: "m.text", - body: "You cannot create a thread 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. Did you try to create a thread inside a thread?" + }) + } + else if (e.code === 50035) { + return api.sendEvent(event.room_id, "m.room.message", { + ...ctx, + msgtype: "m.text", + body: "Specified thread name is too long - thread creation failed. Please yap a bit less in the title, thread body is for that. ;)" }) } else { From 22ff10222c7b32d9f183a02e6d24bd8a1841918b Mon Sep 17 00:00:00 2001 From: Guzio Date: Thu, 26 Feb 2026 15:38:20 +0000 Subject: [PATCH 2/2] fixed error details showing up as [object Object] --- src/matrix/matrix-command-handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/matrix-command-handler.js b/src/matrix/matrix-command-handler.js index 761d299..e6086ba 100644 --- a/src/matrix/matrix-command-handler.js +++ b/src/matrix/matrix-command-handler.js @@ -352,7 +352,7 @@ const commands = [{ msgtype: "m.text", body: "Unknown error occurred during thread creation. See error message below (or on the main channel, if the command was ran inside a thread) for details." }) - throw e; + throw e_raw; } } }