Skip to content

Commit

Permalink
Update mirai-core-api/src/commonMain/kotlin/message/data/Image.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
Him188 authored Aug 12, 2023
1 parent e08bccd commit 38d6fca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mirai-core-api/src/commonMain/kotlin/message/data/Image.kt
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,9 @@ public interface Image : Message, MessageContent, CodableMessage {


public fun build(): Image {
if(type == ImageType.UNKNOWN) type = ImageType.match(imageId.split(".").last())
if (type == ImageType.UNKNOWN) {
type = ImageType.match(imageId.split(".").last())
}
@OptIn(MiraiInternalApi::class)
return InternalImageProtocol.instance.createImage(
imageId = imageId,
Expand Down

0 comments on commit 38d6fca

Please sign in to comment.