using MediatR;

namespace ChatService.API.Application.Commands.Messages;

/// <summary>
/// EN: Command to send an encrypted message.
/// VI: Command để gửi tin nhắn đã mã hóa.
/// </summary>
/// <remarks>
/// EN: The message content is encrypted on client-side using X3DH + Double Ratchet.
/// VI: Nội dung tin nhắn được mã hóa ở client-side bằng X3DH + Double Ratchet.
/// </remarks>
public record SendMessageCommand(
    Guid ConversationId,
    Guid SenderId,
    string EncryptedContent,
    string Nonce,
    string? AuthTag = null,
    string MessageType = "text",
    string? Metadata = null,
    Guid? ReplyToMessageId = null
) : IRequest<SendMessageResult>;

public record SendMessageResult(
    Guid MessageId,
    Guid ConversationId,
    Guid SenderId,
    string Status,
    DateTime CreatedAt
);
