From 2cf47420ea019cd5da1eab101fa3f63188dcafff Mon Sep 17 00:00:00 2001 From: Mia <49593536+mia-pi-git@users.noreply.github.com> Date: Fri, 21 May 2021 12:00:56 -0500 Subject: [PATCH] Helptickets: Auto-upload common battle replays on submit for PM harassment tickets --- server/chat-plugins/helptickets.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/chat-plugins/helptickets.ts b/server/chat-plugins/helptickets.ts index be5650ac33..b9f02e9640 100644 --- a/server/chat-plugins/helptickets.ts +++ b/server/chat-plugins/helptickets.ts @@ -754,6 +754,11 @@ export const textTickets: {[k: string]: TextTicketInfo} = { return buf; }, + onSubmit(ticket, text, submitter, conn) { + const targetId = toID(text[0]); + // this does the saving for us so we don't have to do anything else + getCommonBattles(targetId, Users.get(targetId), submitter.id, submitter, conn); + }, }, inapname: { title: "What's the inappropriate username?",