From b14c0e17f22951429c8d34d71b857aaff52895ad Mon Sep 17 00:00:00 2001 From: wakuflair Date: Thu, 12 Nov 2020 15:58:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84Size=E4=BD=BF?= =?UTF-8?q?=E7=94=A8long=E5=9E=8B=E8=A7=A3=E6=9E=90,=20=E5=A2=9E=E5=8A=A0`?= =?UTF-8?q?SearchableContent`=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CsChatClient/Messages/FileMessageContent.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CsChatClient/Messages/FileMessageContent.cs b/CsChatClient/Messages/FileMessageContent.cs index 8e71063..250db01 100644 --- a/CsChatClient/Messages/FileMessageContent.cs +++ b/CsChatClient/Messages/FileMessageContent.cs @@ -6,7 +6,7 @@ namespace CsChatClient.Messages public class FileMessageContent : MediaMessageContent { public string Name { get; set; } - public int Size { get; set; } + public long Size { get; set; } public override void Decode(MessagePayload payload) { @@ -16,7 +16,7 @@ public override void Decode(MessagePayload payload) { Name = Name.Replace("[文件]", ""); } - Size = int.Parse(payload.Content); + Size = long.Parse(payload.Content); } public override string Digest(MessageEx message) @@ -27,7 +27,7 @@ public override string Digest(MessageEx message) public override MessagePayload Encode() { MessagePayload payload = base.Encode(); - payload.SearchableContent = Name; + payload.SearchableContent = "[文件]" + Name; payload.Content = Size + ""; payload.MediaType = MediaType.MediaTypeFile; return payload; From d1d76812d109aac69ff29ea61727fea8031888a5 Mon Sep 17 00:00:00 2001 From: wakuflair Date: Thu, 12 Nov 2020 15:58:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0`SearchableContent`?= =?UTF-8?q?=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CsChatClient/Messages/ImageMessageContent.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/CsChatClient/Messages/ImageMessageContent.cs b/CsChatClient/Messages/ImageMessageContent.cs index 5e2df2f..0efc6a4 100644 --- a/CsChatClient/Messages/ImageMessageContent.cs +++ b/CsChatClient/Messages/ImageMessageContent.cs @@ -22,6 +22,7 @@ public override string Digest(MessageEx message) public override MessagePayload Encode() { MessagePayload payload = base.Encode(); + payload.SearchableContent = "[图片]"; payload.BinaryContent = ThumbnailBytes; return payload; }