[OneBot] code refactor of ImageSegment.cs
This commit is contained in:
parent
63f0ffaeac
commit
a9a554dbf4
|
@ -21,9 +21,7 @@ public partial class ImageSegment : ISegment
|
|||
|
||||
public void Build(MessageBuilder builder, ISegment segment)
|
||||
{
|
||||
if (segment is ImageSegment imageSegment)
|
||||
{
|
||||
if (imageSegment is not { Url: "" })
|
||||
if (segment is ImageSegment imageSegment and not { Url: "" })
|
||||
{
|
||||
if (imageSegment.Url.StartsWith("http"))
|
||||
{
|
||||
|
@ -43,7 +41,6 @@ public partial class ImageSegment : ISegment
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ISegment FromEntity(IMessageEntity entity)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue