Skip to content

Commit

Permalink
Return unknown if get_image or get_record file type unknown. `c…
Browse files Browse the repository at this point in the history
…an_send_record` now returns `true`
  • Loading branch information
yyuueexxiinngg committed Aug 26, 2020
1 parent eee6154 commit 535aef8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/tech/mihoyo/mirai/MiraiApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ class MiraiApi(val bot: Bot) {
when {
startsWith("2321414D52") -> "amr"
startsWith("02232153494C4B5F5633") -> "silk"
else -> "cqrecord"
else -> "unknown"
}
}
CQResponseDTO.CQRecordInfo(
Expand Down Expand Up @@ -480,7 +480,7 @@ class MiraiApi(val bot: Bot) {
startsWith("89504E47") -> "png"
startsWith("47494638") -> "gif"
startsWith("424D") -> "bmp"
else -> "cqimg"
else -> "unknown"
}
}
CQResponseDTO.CQImageInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ data class CQCanSendImageData(val yes: Boolean = true) : CQResponseDataDTO()

@Serializable
@SerialName("CanSendRecordData")
data class CQCanSendRecordData(val yes: Boolean = false) : CQResponseDataDTO()
data class CQCanSendRecordData(val yes: Boolean = true) : CQResponseDataDTO()

@Serializable
@SerialName("PluginStatusData")
Expand Down

0 comments on commit 535aef8

Please sign in to comment.