Skip to content

Commit

Permalink
Don't crash when calculating chat type if message is null/empty
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed Feb 10, 2022
1 parent 36c44cd commit 00bfe8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion EOLib/Domain/Chat/ChatTypeCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public ChatTypeCalculator(ICharacterProvider characterProvider)
public ChatType CalculateChatType(string input)
{
if(string.IsNullOrEmpty(input))
throw new ArgumentException("Input string must have a value and be non-empty", nameof(input));
return ChatType.Local;

if(!CharacterIsAdmin && (input[0] == '+' || input[0] == '@'))
return ChatType.Local;
Expand Down

0 comments on commit 00bfe8e

Please sign in to comment.