mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 22:01:50 +00:00
Fix unnecessary 'go to original case' links in case log channel
This commit is contained in:
parent
b4fb6de86e
commit
eed4fd586b
2 changed files with 3 additions and 2 deletions
backend/src/plugins/Cases/functions
|
@ -13,6 +13,7 @@ export async function getCaseEmbed(
|
|||
pluginData: GuildPluginData<CasesPluginType>,
|
||||
caseOrCaseId: Case | number,
|
||||
requestMemberId?: string,
|
||||
noOriginalCaseLink?: boolean,
|
||||
): Promise<AdvancedMessageContent> {
|
||||
const theCase = await pluginData.state.cases.with("notes").find(resolveCaseId(caseOrCaseId));
|
||||
if (!theCase) {
|
||||
|
@ -98,7 +99,7 @@ export async function getCaseEmbed(
|
|||
});
|
||||
}
|
||||
|
||||
if (theCase.log_message_id) {
|
||||
if (theCase.log_message_id && noOriginalCaseLink !== false) {
|
||||
const [channelId, messageId] = theCase.log_message_id.split("-");
|
||||
const link = messageLink(pluginData.guild.id, channelId, messageId);
|
||||
embed.fields.push({
|
||||
|
|
|
@ -43,7 +43,7 @@ export async function postCaseToCaseLogChannel(
|
|||
const theCase = await pluginData.state.cases.find(resolveCaseId(caseOrCaseId));
|
||||
if (!theCase) return null;
|
||||
|
||||
const caseEmbed = await getCaseEmbed(pluginData, caseOrCaseId);
|
||||
const caseEmbed = await getCaseEmbed(pluginData, caseOrCaseId, undefined, true);
|
||||
if (!caseEmbed) return null;
|
||||
|
||||
if (theCase.log_message_id) {
|
||||
|
|
Loading…
Add table
Reference in a new issue