feat: support LCIMConversationQuery.Get(string id)

oneRain 2020-12-21 14:46:37 +08:00
parent a5997ef463
commit 33019501d2
1 changed files with 13 additions and 0 deletions

View File

@ -287,5 +287,18 @@ namespace LeanCloud.Realtime {
ReadOnlyCollection<LCIMConversation> conversations = await Find();
return conversations?.First();
}
/// <summary>
/// Retrieves the conversation
/// </summary>
/// <param name="convId"></param>
/// <returns></returns>
public Task<LCIMConversation> Get(string convId) {
if (string.IsNullOrEmpty(convId)) {
throw new ArgumentNullException(nameof(convId));
}
WhereEqualTo("objectId", convId);
return First();
}
}
}