From 73a00928de898703f34598720f1073593e131995 Mon Sep 17 00:00:00 2001 From: oO <47592289+oocytanb@users.noreply.github.com> Date: Sun, 7 Feb 2021 22:47:44 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=8B=E3=82=B3=E7=94=9F=E3=81=AE=E3=82=AE?= =?UTF-8?q?=E3=83=95=E3=83=88=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=81=AE=E6=AD=A3=E8=A6=8F=E8=A1=A8=E7=8F=BE=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NicoSitePlugin2/TestCommentProvider.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NicoSitePlugin2/TestCommentProvider.cs b/NicoSitePlugin2/TestCommentProvider.cs index f117d69b..6bdfb69e 100644 --- a/NicoSitePlugin2/TestCommentProvider.cs +++ b/NicoSitePlugin2/TestCommentProvider.cs @@ -316,7 +316,7 @@ private async Task ProcessChatMessageAsync(Chat.IChatMessage message) } else if (IsGift(chat)) { - var match = Regex.Match(chat.Content, "/gift (\\S+) (\\d+) \"(\\S+)\" (\\d+) \"(\\S+)\" \"(\\S+)\" (\\d+)"); + var match = Regex.Match(chat.Content, "/gift (\\S+) (\\d+|NULL) \"(\\S+)\" (\\d+) \"(\\S*)\" \"(\\S+)\"(?: (\\d+))?"); if (!match.Success) { return; @@ -333,7 +333,7 @@ private async Task ProcessChatMessageAsync(Chat.IChatMessage message) { Text = text, PostedAt = Common.UnixTimeConverter.FromUnixTime(chat.Date), - UserId = userIdp, + UserId = userIdp == "NULL" ? "" : userIdp, NameItems = Common.MessagePartFactory.CreateMessageItems(username), }; comment = gift;