From 9a555a386cb1a8b23403b9b9772eb44d07682cee Mon Sep 17 00:00:00 2001 From: oneRain Date: Thu, 17 Dec 2020 12:19:50 +0800 Subject: [PATCH] chore: chatroom forbide to read. --- Realtime/Realtime/Conversation/LCIMChatRoom.cs | 4 ++++ Realtime/Realtime/Conversation/LCIMConversation.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Realtime/Realtime/Conversation/LCIMChatRoom.cs b/Realtime/Realtime/Conversation/LCIMChatRoom.cs index 6bccd42..5b77f92 100644 --- a/Realtime/Realtime/Conversation/LCIMChatRoom.cs +++ b/Realtime/Realtime/Conversation/LCIMChatRoom.cs @@ -28,5 +28,9 @@ namespace LeanCloud.Realtime { public override Task AddMembers(IEnumerable clientIds) { throw new Exception("Add members is not allowed in chat room."); } + + public override Task Read() { + return Task.CompletedTask; + } } } diff --git a/Realtime/Realtime/Conversation/LCIMConversation.cs b/Realtime/Realtime/Conversation/LCIMConversation.cs index d961d0a..ef9fbcf 100644 --- a/Realtime/Realtime/Conversation/LCIMConversation.cs +++ b/Realtime/Realtime/Conversation/LCIMConversation.cs @@ -181,7 +181,7 @@ namespace LeanCloud.Realtime { /// /// /// - public async Task Read() { + public virtual async Task Read() { if (LastMessage == null) { return; }