Commit 32eb36f8 authored by Him188's avatar Him188

Allow quoting offline message sources

parent 1a4c3ba6
......@@ -380,12 +380,12 @@ fun MessageSource.quote(): QuoteReply {
}
/**
* 引用这条消息
* 引用这条消息. 仅从服务器接收的消息 (即来自 [ContactMessage]) 才可以通过这个方式被引用.
* @see QuoteReply
*/
fun MessageChain.quote(): QuoteReply {
@OptIn(MiraiInternalAPI::class)
return QuoteReply(this.source as? OnlineMessageSource ?: error("only online messages can be quoted"))
return QuoteReply(this.source)
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment