From e38206ffb34775081d5e2d8f616c86b6fb638636 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 20 Jul 2021 10:46:40 +0200 Subject: [PATCH 1/3] Fix premium tickets --- www/support/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/support/ui.js b/www/support/ui.js index 90fd43fa5..db51e1221 100644 --- a/www/support/ui.js +++ b/www/support/ui.js @@ -345,7 +345,7 @@ define([ var senderKey = content.sender && content.sender.edPublic; var fromMe = senderKey === privateData.edPublic; var fromAdmin = ctx.adminKeys.indexOf(senderKey) !== -1; - var fromPremium = Boolean(content.sender.plan); + var fromPremium = Boolean(content.sender.plan || Util.find(content, ['sender', 'quota', 'plan']); var userData = h('div.cp-support-showdata', [ Messages.support_showData, From 1a88baf9c367bb41edb579df694fc67dd17c9a07 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 20 Jul 2021 10:48:25 +0200 Subject: [PATCH 2/3] lint compliance --- www/support/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/support/ui.js b/www/support/ui.js index db51e1221..f61ddac4b 100644 --- a/www/support/ui.js +++ b/www/support/ui.js @@ -345,7 +345,7 @@ define([ var senderKey = content.sender && content.sender.edPublic; var fromMe = senderKey === privateData.edPublic; var fromAdmin = ctx.adminKeys.indexOf(senderKey) !== -1; - var fromPremium = Boolean(content.sender.plan || Util.find(content, ['sender', 'quota', 'plan']); + var fromPremium = Boolean(content.sender.plan || Util.find(content, ['sender', 'quota', 'plan'])); var userData = h('div.cp-support-showdata', [ Messages.support_showData, From d530a51f99facde8c496142f46615bc85c941542 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 20 Jul 2021 10:51:12 +0200 Subject: [PATCH 3/3] Fix premium ticket category in admin panel --- www/admin/inner.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/admin/inner.js b/www/admin/inner.js index 61cf05896..b35059df0 100644 --- a/www/admin/inner.js +++ b/www/admin/inner.js @@ -833,7 +833,8 @@ define([ var premium = t.some(function (msg) { var _ed = Util.find(msg, ['content', 'msg', 'content', 'sender', 'edPublic']); if (ed !== _ed) { return; } - return Util.find(msg, ['content', 'msg', 'content', 'sender', 'plan']); + return Util.find(msg, ['content', 'msg', 'content', 'sender', 'plan']) || + Util.find(msg, ['content', 'msg', 'content', 'sender', 'quota', 'plan']); }); var lastMsg = t[t.length - 1]; var lastMsgEd = Util.find(lastMsg, ['content', 'msg', 'content', 'sender', 'edPublic']);