Skip to content

Commit

Permalink
[OneBot] Fix File Segment Property Name
Browse files Browse the repository at this point in the history
  • Loading branch information
ishkong authored Dec 15, 2024
1 parent 0d27bab commit 4ef0836
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Lagrange.OneBot/Message/Entity/FileSegment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ public partial class FileSegment(string fileName, string fileHash, string fileId
{
public FileSegment() : this("", "", "", "") { }

[JsonPropertyName("filename")] public string Filename { get; set; } = fileName;
[JsonPropertyName("file_name")] public string Filename { get; set; } = fileName;

[JsonPropertyName("filehash")] public string Filehash { get; set; } = fileHash;
[JsonPropertyName("file_hash")] public string Filehash { get; set; } = fileHash;

[JsonPropertyName("id")] public string Fileid { get; set; } = fileId;
[JsonPropertyName("file_id")] public string Fileid { get; set; } = fileId;

[JsonPropertyName("url")] public string Url { get; set; } = url;

Expand Down Expand Up @@ -42,4 +42,4 @@ public override SegmentBase FromEntity(MessageChain chain, IMessageEntity entity

return new FileSegment(fileEntity.FileName, fileEntity.FileHash ?? "", fileEntity.FileId ?? fileEntity.FileUuid ?? "", fileEntity.FileUrl ?? "");
}
}
}

0 comments on commit 4ef0836

Please sign in to comment.