From 5c5670c66fd78df791c24d0370d20fed06297863 Mon Sep 17 00:00:00 2001 From: Him188 Date: Sat, 8 Feb 2020 16:03:20 +0800 Subject: [PATCH] Add QuoteReply --- .../net.mamoe.mirai/message/data/MessageSource.kt | 8 ++++++++ .../kotlin/net.mamoe.mirai/message/data/QuoteReply.kt | 11 +++++++++++ 2 files changed, 19 insertions(+) create mode 100644 mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/MessageSource.kt create mode 100644 mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/QuoteReply.kt diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/MessageSource.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/MessageSource.kt new file mode 100644 index 000000000..571174f55 --- /dev/null +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/MessageSource.kt @@ -0,0 +1,8 @@ +package net.mamoe.mirai.message.data + +/** + * 消息源, 用于被引用. 它将由协议模块实现为 `MessageSourceImpl` + */ +interface MessageSource : Message { + companion object : Message.Key +} \ No newline at end of file diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/QuoteReply.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/QuoteReply.kt new file mode 100644 index 000000000..3b32a8fbe --- /dev/null +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/QuoteReply.kt @@ -0,0 +1,11 @@ +package net.mamoe.mirai.message.data + + +/** + * 群内的引用回复. 它将由协议模块实现为 `QuoteReplyImpl` + */ +interface QuoteReply : Message { + val source: MessageSource + + companion object Key : Message.Key +} \ No newline at end of file