Skip to content

Commit

Permalink
[#104] Warn about sharing message with the dev team
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dcastro committed Sep 7, 2023
1 parent 98d3669 commit 4cd1f0b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/TzBot/Slack/Modal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4cd1f0b

Please sign in to comment.