feat: support LCIMConversationQuery.Get(string id)
parent
a5997ef463
commit
33019501d2
|
@ -287,5 +287,18 @@ namespace LeanCloud.Realtime {
|
||||||
ReadOnlyCollection<LCIMConversation> conversations = await Find();
|
ReadOnlyCollection<LCIMConversation> conversations = await Find();
|
||||||
return conversations?.First();
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue