chore: chatroom forbide to read.

oneRain 2020-12-17 12:19:50 +08:00
parent 6ace14fa0f
commit 9a555a386c
2 changed files with 5 additions and 1 deletions

View File

@ -28,5 +28,9 @@ namespace LeanCloud.Realtime {
public override Task<LCIMPartiallySuccessResult> AddMembers(IEnumerable<string> clientIds) { public override Task<LCIMPartiallySuccessResult> AddMembers(IEnumerable<string> clientIds) {
throw new Exception("Add members is not allowed in chat room."); throw new Exception("Add members is not allowed in chat room.");
} }
public override Task Read() {
return Task.CompletedTask;
}
} }
} }

View File

@ -181,7 +181,7 @@ namespace LeanCloud.Realtime {
/// </summary> /// </summary>
/// <param name="message"></param> /// <param name="message"></param>
/// <returns></returns> /// <returns></returns>
public async Task Read() { public virtual async Task Read() {
if (LastMessage == null) { if (LastMessage == null) {
return; return;
} }