Skip to content

Commit

Permalink
Release 1.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoii committed Dec 19, 2020
1 parent 372b01f commit ea02dc3
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# 更新日志

## \[1.9.1\] - 2020-12-19

### 变更

* 更新 `core` 依赖到 `2.0-M1`

> 本版本为实验性,请酌情考虑更新


## \[1.9.0\] - 2020-12-18

### 优化
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build
httpVersion=v1.9.0
httpVersion=v1.9.1
# style guide
kotlin.code.style=official
# config
Expand Down
2 changes: 1 addition & 1 deletion mirai-api-http/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id("kotlinx-serialization")
kotlin("jvm")
id("net.mamoe.mirai-console") version "2.0-M1-dev-2"
id("net.mamoe.mirai-console") version "2.0-M1"
}

tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import java.io.File
internal typealias CommandSubscriber = suspend (String, Long, Long, List<String>) -> Unit

object HttpApiPluginBase : KotlinPlugin(
JvmPluginDescription(id = "net.mamoe.mirai-api-http", version = "1.9.0") {
JvmPluginDescription(id = "net.mamoe.mirai-api-http", version = "1.9.1") {
author("ryoii")
info("Mirai HTTP API Server Plugin")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import net.mamoe.mirai.event.events.TempMessageEvent
import net.mamoe.mirai.message.*
import net.mamoe.mirai.message.data.*
import net.mamoe.mirai.message.data.Image.Key.queryUrl
import net.mamoe.mirai.utils.MiraiInternalApi
import net.mamoe.mirai.utils.uploadImage
import java.net.URL

Expand Down Expand Up @@ -191,6 +192,7 @@ suspend fun Message.toDTO() = when (this) {
else -> UnknownMessageDTO
}

@OptIn(MiraiInternalApi::class)
suspend fun MessageDTO.toMessage(contact: Contact) = when (this) {
is AtDTO -> (contact as Group).getOrFail(target).at()
is AtAllDTO -> AtAll
Expand Down

0 comments on commit ea02dc3

Please sign in to comment.