Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions src/WhatsApp/Content.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,6 @@ public abstract record Content
public abstract ContentType Type { get; }
}

/// <summary>
/// Content contains a document.
/// </summary>
/// <param name="Id">Document identifier.</param>
/// <param name="Name">Document name.</param>
/// <param name="Mime">Mime type of the document content.</param>
/// <param name="Sha256">Hash of the document content.</param>
public record DocumentContent(string Id, string Name, string Mime, string Sha256) : Content
{
/// <inheritdoc/>
[JsonIgnore]
public override ContentType Type => ContentType.Document;
}

/// <summary>
/// Content contains contact information.
/// </summary>
Expand Down Expand Up @@ -91,6 +77,20 @@ public record LocationContent(Location Location, string? Address, string? Name,
/// <param name="Sha256">Hash of the media.</param>
public abstract record MediaContent(string Id, string Mime, string Sha256) : Content;

/// <summary>
/// Content contains a document.
/// </summary>
/// <param name="Id">Document identifier.</param>
/// <param name="Name">Document name.</param>
/// <param name="Mime">Mime type of the document content.</param>
/// <param name="Sha256">Hash of the document content.</param>
public record DocumentContent(string Id, string Name, string Mime, string Sha256) : MediaContent(Id, Mime, Sha256)
{
/// <inheritdoc/>
[JsonIgnore]
public override ContentType Type => ContentType.Document;
}

/// <summary>
/// Content contains audio.
/// </summary>
Expand Down