From 21a1bc6c08b0990c84ef1f3f101c014cb554f6ee Mon Sep 17 00:00:00 2001 From: Someone Date: Mon, 10 Jan 2022 19:27:34 +0100 Subject: [PATCH] modules/DialogManagedReport.py --- modules/DialogManagedReport.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/DialogManagedReport.py b/modules/DialogManagedReport.py index 890a9c6..99eeee1 100644 --- a/modules/DialogManagedReport.py +++ b/modules/DialogManagedReport.py @@ -5,8 +5,6 @@ # This command relies on the priviledged DB-Cleaner maint script. -from inspect import cleandoc - import logging logger = logging.getLogger(__name__) @@ -68,8 +66,8 @@ class DialogManagedReport(AbstractCommand): def on_POST_dialog(self, request, data): - u = self.bot.api.get_user(data["user_id"]) - t = self.bot.api.get_team(data["team_id"]) - c = self.bot.api.get_channel(data["channel_id"]) + user = self.bot.api.get_user(data["user_id"]) + team = self.bot.api.get_team(data["team_id"]) + chan = self.bot.api.get_channel(data["channel_id"]) - self.bot.api.create_post(self.report_chan_id, "``AUTODELETE-MONTH`` ``/"+self.TRIGGER+"`` used by ``@"+u["username"]+"`` in ``"+t["name"]+"::"+c["name"]+"``\n#### Reported post: https://mattermost.fsinf.at/"+t["name"]+"/pl/"+data["state"]+"\nReason:\n```\n"+data["submission"]["report_reason"].strip()+"\n```") + self.bot.api.create_post(self.report_chan_id, "``AUTODELETE-MONTH`` ``/"+self.TRIGGER+"`` used by ``@"+user["username"]+"`` in ``"+team["name"]+"::"+chan["name"]+"``\n#### Reported post: https://mattermost.fsinf.at/"+team["name"]+"/pl/"+data["state"]+"\nReason:\n```\n"+data["submission"]["report_reason"].strip()+"\n```") -- 2.43.0