diff --git a/Realtime/Conversation/LCIMConversation.cs b/Realtime/Conversation/LCIMConversation.cs
index 26c4f3e..8f19470 100644
--- a/Realtime/Conversation/LCIMConversation.cs
+++ b/Realtime/Conversation/LCIMConversation.cs
@@ -61,10 +61,28 @@ namespace LeanCloud.Realtime {
get; internal set;
}
- public DateTime LastMessageAt {
+ public long LastDeliveredTimestamp {
get; internal set;
}
+ public DateTime LastDeliveredAt {
+ get {
+ DateTimeOffset dateTimeOffset = DateTimeOffset.FromUnixTimeMilliseconds(LastDeliveredTimestamp);
+ return dateTimeOffset.DateTime;
+ }
+ }
+
+ public long LastReadTimestamp {
+ get; internal set;
+ }
+
+ public DateTime LastReadAt {
+ get {
+ DateTimeOffset dateTimeOffset = DateTimeOffset.FromUnixTimeMilliseconds(LastReadTimestamp);
+ return dateTimeOffset.DateTime;
+ }
+ }
+
public object this[string key] {
get {
return customProperties[key];
@@ -243,6 +261,11 @@ namespace LeanCloud.Realtime {
return await Client.ConversationController.BlockMembers(Id, clientIds);
}
+ ///
+ /// 将用户移除黑名单
+ ///
+ ///
+ ///
public async Task UnblockMembers(IEnumerable clientIds) {
if (clientIds == null || clientIds.Count() == 0) {
throw new ArgumentNullException(nameof(clientIds));
@@ -334,14 +357,23 @@ namespace LeanCloud.Realtime {
///
/// 查询黑名单用户
///
- ///
- ///
+ /// 限制
+ /// 其实用户 Id
///
public async Task QueryBlockedMembers(int limit = 10,
string next = null) {
return await Client.ConversationController.QueryBlockedMembers(Id, limit, next);
}
+ ///
+ /// 查询聊天记录
+ ///
+ /// 起点
+ /// 终点
+ /// 查找方向
+ /// 限制
+ /// 消息类型
+ ///
public async Task> QueryMessages(LCIMMessageQueryEndpoint start = null,
LCIMMessageQueryEndpoint end = null,
LCIMMessageQueryDirection direction = LCIMMessageQueryDirection.NewToOld,
@@ -350,6 +382,14 @@ namespace LeanCloud.Realtime {
return await Client.MessageController.QueryMessages(Id, start, end, direction, limit, messageType);
}
+ ///
+ /// 获取会话已收/已读时间戳
+ ///
+ ///
+ public async Task FetchReciptTimestamps() {
+ await Client.ConversationController.FetchReciptTimestamp(Id);
+ }
+
internal static bool IsTemporayConversation(string convId) {
return convId.StartsWith("_tmp:");
}
@@ -381,9 +421,9 @@ namespace LeanCloud.Realtime {
IEnumerable ids = (muo as IList