Skip to content

Commit

Permalink
[OneBot] Get image path from Uri method
Browse files Browse the repository at this point in the history
  • Loading branch information
Linwenxuan authored Jan 15, 2024
2 parents 822f42f + eae4ac3 commit 592761d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lagrange.OneBot/Core/Message/Entity/ImageSegment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void Build(MessageBuilder builder, ISegment segment)

if (imageSegment.Url.StartsWith("file"))
{
string path = imageSegment.Url.Replace("file://", "");
string path = new Uri(imageSegment.Url).AbsolutePath;
builder.Image(File.ReadAllBytes(path));
}

Expand Down

0 comments on commit 592761d

Please sign in to comment.