-
Notifications
You must be signed in to change notification settings - Fork 2
Move the Approve button to the notification channel set in appsettings.json
+ minor change regarding the Waiting For Approval message
#6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jedrek0429
wants to merge
12
commits into
ProgramowanieCommunity:master
Choose a base branch
from
jedrek0429:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
19bdc0f
Change `WaitingForApprovalResponse` from a reply to a normal message
jedrek0429 9ef7efc
Change `WaitingForApproval*Response` to `WaitingForApproval*Message` …
jedrek0429 30f89b2
Move `ApproveInteraction` button to `PostResolvedNotificationChannel`
jedrek0429 8aa666c
Apply suggestions from code review
jedrek0429 7ddf3bc
Change `postId` to `channelId`, as by convention this is ineed a chan…
jedrek0429 61507a6
Rename `helper` to `helperId` in `ResolveInteraction` button interact…
jedrek0429 beb8888
Add `SendPostResolveMessages` to `PostHelper` and replace unnecessari…
jedrek0429 e1aaa83
Merge local changes with master branch
jedrek0429 fa895c4
Rename `SendPostResolveMessages` to `SendPostResolveMessagesAsync`
jedrek0429 caab97c
Fix bot returning a forbidden callback type for `ResolveCommand`. A f…
jedrek0429 7665db1
Apply suggestion (formatting issue)
jedrek0429 2eee47c
Apply suggestion (formatting issue)
jedrek0429 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it better to send the message about resolve in the interaction response instead of responding with an emoji and sending a normal message?
You also added an unnecessary blank line at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the main points of this PR, besides moving the Approve button, was to change this exact behaviour that was adopted earlier. I wanted to get rid of the ugly text that said "Original message was deleted" (as seen on the screenshot).

Naturally, when it comes to using a slash command this does not take place, however, I wanted to maintain some sort of consistency and make all the Post Resolve messages regular messages instead of replies or interaction responses.
Also, thank you for your additional feedback regarding my code formatting. I will include that in my next commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As promised, formatting issue fixed with 2eee47c.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I think slash commands look good. "Original message was deleted" happens only when using a component of an ephemeral message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am aware of that, but, again, all I wanted was a bit of consistency. Moreover, changing that would require either changing the helper method or not using it, which would require more code while the change wouldn't be neither that noticeable nor that important for the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole change won't be noticeable by users at all but I think sending an interaction response with an emoji is not a good idea, it's better to just respond to the interaction with the resolve message. We have more inconsistency with the current approach either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what are you suggesting? Abandoning the helper in this particular case, or adding an exception to the method where if it's a slash command it will use an interaction response rather than a regular message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can create another overload (or method because maybe the current name would be confusing) that is for slash commands. The 2 methods can also share some private helpers to make the code less repetitive.