2020-03-12 16:23:21 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace LeanCloud.Realtime {
|
2020-03-16 11:50:49 +08:00
|
|
|
|
public abstract class LCIMMessage {
|
2020-03-18 16:21:29 +08:00
|
|
|
|
internal const int TextMessageType = -1;
|
|
|
|
|
internal const int ImageMessageType = -2;
|
|
|
|
|
internal const int AudioMessageType = -3;
|
|
|
|
|
internal const int VideoMessageType = -4;
|
|
|
|
|
internal const int LocationMessageType = -5;
|
|
|
|
|
internal const int FileMessageType = -6;
|
2020-04-26 15:50:06 +08:00
|
|
|
|
internal const int RecalledMessageType = -127;
|
2020-03-18 16:21:29 +08:00
|
|
|
|
|
2020-03-12 16:23:21 +08:00
|
|
|
|
public string ConversationId {
|
|
|
|
|
get; set;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Id {
|
|
|
|
|
get; set;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string FromClientId {
|
|
|
|
|
get; set;
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-16 11:50:49 +08:00
|
|
|
|
public long SentTimestamp {
|
|
|
|
|
get; internal set;
|
2020-03-12 16:23:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DateTime SentAt {
|
2020-03-16 11:50:49 +08:00
|
|
|
|
get {
|
|
|
|
|
return DateTimeOffset.FromUnixTimeMilliseconds(SentTimestamp)
|
|
|
|
|
.LocalDateTime;
|
|
|
|
|
}
|
2020-03-12 16:23:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-03-16 11:50:49 +08:00
|
|
|
|
public long DeliveredTimestamp {
|
|
|
|
|
get; internal set;
|
2020-03-12 16:23:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DateTime DeliveredAt {
|
2020-03-16 11:50:49 +08:00
|
|
|
|
get {
|
|
|
|
|
return DateTimeOffset.FromUnixTimeMilliseconds(DeliveredTimestamp)
|
|
|
|
|
.LocalDateTime;
|
|
|
|
|
}
|
2020-03-12 16:23:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-03-16 11:50:49 +08:00
|
|
|
|
public long ReadTimestamp {
|
|
|
|
|
get; internal set;
|
2020-03-12 16:23:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DateTime ReadAt {
|
2020-03-16 11:50:49 +08:00
|
|
|
|
get {
|
|
|
|
|
return DateTimeOffset.FromUnixTimeMilliseconds(ReadTimestamp)
|
|
|
|
|
.LocalDateTime;
|
|
|
|
|
}
|
2020-03-12 16:23:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-03-16 11:50:49 +08:00
|
|
|
|
public long PatchedTimestamp {
|
|
|
|
|
get; internal set;
|
2020-03-12 16:23:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DateTime PatchedAt {
|
2020-03-16 11:50:49 +08:00
|
|
|
|
get {
|
|
|
|
|
return DateTimeOffset.FromUnixTimeMilliseconds(PatchedTimestamp)
|
|
|
|
|
.LocalDateTime;
|
|
|
|
|
}
|
2020-03-12 16:23:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-03-27 17:30:18 +08:00
|
|
|
|
public List<string> MentionIdList {
|
2020-03-12 16:23:21 +08:00
|
|
|
|
get; set;
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-17 16:17:19 +08:00
|
|
|
|
public bool MentionAll {
|
|
|
|
|
get; set;
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-27 17:30:18 +08:00
|
|
|
|
public bool Mentioned {
|
|
|
|
|
get; internal set;
|
2020-03-12 16:23:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-04-16 11:38:22 +08:00
|
|
|
|
public bool IsTransient {
|
|
|
|
|
get; internal set;
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-27 17:30:18 +08:00
|
|
|
|
internal LCIMMessage() {
|
2020-03-18 16:21:29 +08:00
|
|
|
|
}
|
2020-03-12 16:23:21 +08:00
|
|
|
|
}
|
|
|
|
|
}
|