implement DMServiceProvider and Chat.DM models

This commit is contained in:
2026-05-03 14:28:05 +02:00
parent d236afb1de
commit bf8bd8f91e
2 changed files with 160 additions and 5 deletions

View File

@@ -13,17 +13,108 @@ namespace Chtn.CSharp.SDK.Models.Chat.DM
[JsonProperty("files")] public List<Attachment> Files { get; set; }
}
public class DmPinMessageReq
public class PinnedMessage : DmMessage { }
public class GetMessagesReq
{
[JsonProperty("chatid")] public string ChatId { get; set; }
[JsonProperty("messageId")] public string MessageId { get; set; }
[JsonProperty("userid")] public string UserId { get; set; }
[JsonProperty("limit")] public string Limit { get; set; }
}
public class DmJoinWsRoomReq
public class GetMessagePosReq
{
[JsonProperty("chatid")] public string ChatId { get; set; }
[JsonProperty("msgid")] public string MessageId { get; set; }
}
public class GetPinnedMessagesReq
{
[JsonProperty("chatid")] public string ChatId { get; set; }
}
public class EditMessageReq
{
[JsonProperty("chatid")] public string ChatId { get; set; }
[JsonProperty("limit")] public string Limit { get; set; }
[JsonProperty("content")] public string Content { get; set; }
}
public class DeleteMessageReq
{
[JsonProperty("chatid")] public string ChatId { get; set; }
[JsonProperty("msgid")] public string MessageId { get; set; }
}
public class FinishMessageReq
{
[JsonProperty("chatid")] public string ChatId { get; set; }
[JsonProperty("msgid")] public string MessageId { get; set; }
}
public class ReadMessagesReq
{
[JsonProperty("chatid")] public string ChatId { get; set; }
}
public class PinMessageReq
{
[JsonProperty("chatid")] public string ChatId { get; set; }
[JsonProperty("msgid")] public string MessageId { get; set; }
}
public class UnpinMessageReq
{
[JsonProperty("chatid")] public string ChatId { get; set; }
[JsonProperty("msgid")] public string MessageId { get; set; }
}
public class DeleteMessagesReq
{
[JsonProperty("chatid")] public string ChatId { get; set; }
[JsonProperty("userId")] public string UserId { get; set; }
}
public class JoinWsRoomReq
{
[JsonProperty("connId")] public string ConnId { get; set; }
[JsonProperty("chatid")] public string ChatId { get; set; }
[JsonProperty("userid")] public string UserId { get; set; }
}
public class GetMessagePosResp
{
[JsonProperty("pos")] public int Position { get; set; }
}
public class WSMessageDeletedPayload
{
[JsonProperty("msgid")] public string MessageId { get; set; }
[JsonProperty("chatid")] public string ChatId { get; set; }
}
public class WSMessageEditedPayload
{
[JsonProperty("msgid")] public string MessageId { get; set; }
[JsonProperty("content")] public string Content { get; set; }
}
public class WSNewMessagePayload
{
[JsonProperty("message")] public DmMessage Message { get; set; }
}
public class WSMessagePinnedPayload
{
[JsonProperty("msgid")] public string MessageId { get; set; }
}
public class WSMessagesReadPayload
{
[JsonProperty("chatid")] public string ChatId { get; set; }
[JsonProperty("readerId")] public string ReaderId { get; set; }
}
public class WSMessageUnpinnedPayload
{
[JsonProperty("msgid")] public string MessageId { get; set; }
}
}