Skip to content

Commit

Permalink
Fix Discord message getting sent for private states
Browse files Browse the repository at this point in the history
  • Loading branch information
ondryaso committed Feb 28, 2024
1 parent 1252786 commit fae17bc
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public FitwideDiscordTransitionHandler(IOptionsMonitor<ClubStateOptions> options
public async Task PerformStartAction(int stateId, int? previousStateId)
{
var state = await _stateService.GetState(stateId);
if (state.Type is StateType.Private or StateType.Closed)
return;

var previousState = previousStateId.HasValue ? await _stateService.GetState(previousStateId.Value) : null;

string msg = null;
Expand Down

0 comments on commit fae17bc

Please sign in to comment.