From 6d93b3014498929a893e15e46c869a810225ab1e Mon Sep 17 00:00:00 2001 From: Matthew Olivo Date: Sun, 1 Nov 2020 12:26:54 -0800 Subject: [PATCH] - Changing username trimming to user lookup logic --- MixItUp.Base/Services/Twitch/TwitchEventService.cs | 2 +- MixItUp.Base/Services/UserService.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MixItUp.Base/Services/Twitch/TwitchEventService.cs b/MixItUp.Base/Services/Twitch/TwitchEventService.cs index f25c6dba6..2d94685f5 100644 --- a/MixItUp.Base/Services/Twitch/TwitchEventService.cs +++ b/MixItUp.Base/Services/Twitch/TwitchEventService.cs @@ -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(redemption.user_input.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)); } diff --git a/MixItUp.Base/Services/UserService.cs b/MixItUp.Base/Services/UserService.cs index 9969be2a5..c44e8bf27 100644 --- a/MixItUp.Base/Services/UserService.cs +++ b/MixItUp.Base/Services/UserService.cs @@ -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))