Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OneBot] Fix File Segment Property Name #709

Merged
merged 1 commit into from
Dec 15, 2024
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
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 ?? "");
}
}
}
Loading