mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 15:40:28 +08:00
http api prepare for recall with a dto
This commit is contained in:
parent
c8ed80c0a5
commit
068de99531
@ -18,12 +18,12 @@ import io.ktor.response.respondText
|
|||||||
import io.ktor.routing.post
|
import io.ktor.routing.post
|
||||||
import io.ktor.routing.routing
|
import io.ktor.routing.routing
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
|
import kotlinx.serialization.Transient
|
||||||
import net.mamoe.mirai.api.http.AuthedSession
|
import net.mamoe.mirai.api.http.AuthedSession
|
||||||
import net.mamoe.mirai.api.http.SessionManager
|
import net.mamoe.mirai.api.http.SessionManager
|
||||||
import net.mamoe.mirai.api.http.data.*
|
import net.mamoe.mirai.api.http.data.*
|
||||||
import net.mamoe.mirai.api.http.data.common.MessageChainDTO
|
import net.mamoe.mirai.api.http.data.common.MessageChainDTO
|
||||||
import net.mamoe.mirai.api.http.data.common.VerifyDTO
|
import net.mamoe.mirai.api.http.data.common.VerifyDTO
|
||||||
import net.mamoe.mirai.api.http.data.common.toDTO
|
|
||||||
import net.mamoe.mirai.api.http.data.common.toMessageChain
|
import net.mamoe.mirai.api.http.data.common.toMessageChain
|
||||||
import net.mamoe.mirai.api.http.util.toJson
|
import net.mamoe.mirai.api.http.util.toJson
|
||||||
import net.mamoe.mirai.contact.toList
|
import net.mamoe.mirai.contact.toList
|
||||||
@ -119,3 +119,8 @@ private data class SendImageDTO(
|
|||||||
val urls: List<String>
|
val urls: List<String>
|
||||||
) : VerifyDTO()
|
) : VerifyDTO()
|
||||||
|
|
||||||
|
@Serializable
|
||||||
|
private class SendRetDTO(
|
||||||
|
@Transient val stateCode: StateCode = StateCode.Success,
|
||||||
|
val messageId: Long
|
||||||
|
) : StateCode(stateCode.code, stateCode.msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user