Skip to content

Commit

Permalink
Merge branch 'v1.8.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverbooth committed Jul 28, 2023
2 parents 81c3e5a + 56431ff commit 63d9ab2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.8.1] - 2023-07-28

### Changed

- Threads are not deleted for Accepted suggestions.

## [1.8.0] - 2023-07-28

### Added
Expand Down Expand Up @@ -141,6 +147,7 @@ implemented, accepted, or rejected.

- Initial release.

[1.8.1]: https://github.com/BrackeysBot/SuggestionBot/releases/tag/v1.8.1
[1.8.0]: https://github.com/BrackeysBot/SuggestionBot/releases/tag/v1.8.0
[1.7.0]: https://github.com/BrackeysBot/SuggestionBot/releases/tag/v1.7.0
[1.6.3]: https://github.com/BrackeysBot/SuggestionBot/releases/tag/v1.6.3
Expand Down
11 changes: 7 additions & 4 deletions SuggestionBot/Services/SuggestionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -693,11 +693,14 @@ public async Task UpdateSuggestionAsync(Suggestion suggestion)
{
await message.DeleteAllReactionsAsync().ConfigureAwait(false);

DiscordThreadChannel? thread = GetThread(suggestion);
if (thread is not null)
if (suggestion.Status != SuggestionStatus.Accepted)
{
await thread.DeleteAsync("Suggestion closed").ConfigureAwait(false);
SetThread(suggestion, null);
DiscordThreadChannel? thread = GetThread(suggestion);
if (thread is not null)
{
await thread.DeleteAsync("Suggestion closed").ConfigureAwait(false);
SetThread(suggestion, null);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion SuggestionBot/SuggestionBot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<VersionPrefix>1.8.0</VersionPrefix>
<VersionPrefix>1.8.1</VersionPrefix>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
Expand Down

0 comments on commit 63d9ab2

Please sign in to comment.