From eb61351c794c162af1fdc87503389e994ae2e4d4 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 28 Mar 2024 16:11:48 +0100 Subject: [PATCH] Fix broken link on support notification --- www/common/notifications.js | 3 ++- www/moderation/inner.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/www/common/notifications.js b/www/common/notifications.js index 73d0d95b6..82fb4b45d 100644 --- a/www/common/notifications.js +++ b/www/common/notifications.js @@ -494,7 +494,8 @@ define([ return text; }; content.handler = function () { - let url = msg.isAdmin ? '/support/#tickets' : `/moderation/#support-${content.channel}`; + let id = Util.hexToBase64(msg.channel).slice(0,10); + let url = msg.isAdmin ? '/support/#tickets' : `/moderation/#open-${id}`; common.openURL(url); defaultDismiss(common, data)(); }; diff --git a/www/moderation/inner.js b/www/moderation/inner.js index b5ef211d7..4fd9fa99f 100644 --- a/www/moderation/inner.js +++ b/www/moderation/inner.js @@ -992,7 +992,7 @@ Attachments:${JSON.stringify(msg.attachments, 0, 2)}`; let active = privateData.category || 'active'; let linkedTicket; if (active.indexOf('-') !== -1) { - linkedTicket = active.split('-')[1]; + linkedTicket = active.slice(active.indexOf('-')+1); active = active.split('-')[0]; }