Skip to content

Commit

Permalink
- Changing username trimming to user lookup logic
Browse files Browse the repository at this point in the history
  • Loading branch information
SaviorXTanren committed Nov 1, 2020
1 parent ba29273 commit 6d93b30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MixItUp.Base/Services/Twitch/TwitchEventService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ private async void PubSub_OnChannelPointsRedeemed(object sender, PubSubChannelPo
specialIdentifiers["rewardcost"] = redemption.reward.cost.ToString();
if (!string.IsNullOrEmpty(redemption.user_input))
{
specialIdentifiers["message"] = redemption.user_input.Trim();
specialIdentifiers["message"] = redemption.user_input;
arguments = new List<string>(redemption.user_input.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries));
}

Expand Down
2 changes: 1 addition & 1 deletion MixItUp.Base/Services/UserService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public UserViewModel GetUserByUsername(string username, StreamingPlatformTypeEnu
UserViewModel user = null;
if (!string.IsNullOrEmpty(username))
{
username = username.ToLower().Replace("@", "");
username = username.ToLower().Replace("@", "").Trim();
if (platform.HasFlag(StreamingPlatformTypeEnum.Twitch) || platform == StreamingPlatformTypeEnum.None)
{
if (this.usersByTwitchLogin.TryGetValue(username.ToLower(), out user))
Expand Down

0 comments on commit 6d93b30

Please sign in to comment.