From 4cd1f0b0cb94213dcb50b27f291a5f0df0511f72 Mon Sep 17 00:00:00 2001 From: Diogo Castro Date: Thu, 7 Sep 2023 13:21:32 +0100 Subject: [PATCH] [#104] Warn about sharing message with the dev team Problem: When the user uses the "report an issue" feature, the message with the time references will be sent to the dev team. Seeing as this message could contain private information (e.g. it could be in a private channel, or be in a DM, etc), we should warn the user about this. Solution: Warn the user that their message will be shared with the dev team. --- src/TzBot/Slack/Modal.hs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/TzBot/Slack/Modal.hs b/src/TzBot/Slack/Modal.hs index b54aa9b..dc758e5 100644 --- a/src/TzBot/Slack/Modal.hs +++ b/src/TzBot/Slack/Modal.hs @@ -7,6 +7,7 @@ module TzBot.Slack.Modal where import TzPrelude import Data.List (singleton) +import Text.Interpolation.Nyan import TzBot.Feedback.Dialog.Types import TzBot.Instances () @@ -44,12 +45,20 @@ mkReportModal shownMessageText conversionPairsMb metadata = , mNotifyOnClose = False , mCallbackId = Fixtures.reportModal , mPrivateMetadata = unReportDialogId metadata - , mBlocks = mkBlocks shownMessageText conversionPairsMb $ BInput reportInput + , mBlocks = mkBlocks messageText conversionPairsMb $ BInput reportInput } + where + messageText = + [int|| + *Note*: The contents of this message will be shared with the development team. + + + #{shownMessageText} + |] reportInput :: Input reportInput = Input - { iLabel = "Time references processed wrongly/unrecognized?" + { iLabel = "Are there any issues with how this message was processed?" , iBlockId = Fixtures.reportInputBlockId , iElement = PlainTextInput { ptiActionId = Fixtures.reportInputElementActionId