mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-26 16:10:11 +08:00
Fix CombinedScope
This commit is contained in:
parent
2223451b70
commit
e41a2c0d09
@ -526,8 +526,8 @@ internal fun MessageScope.asSequence(): Sequence<MessageScope> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class CombinedScope(
|
private class CombinedScope(
|
||||||
private val first: MessageScope,
|
val first: MessageScope,
|
||||||
private val second: MessageScope
|
val second: MessageScope,
|
||||||
) : MessageScope {
|
) : MessageScope {
|
||||||
override val realTarget: Any? get() = null
|
override val realTarget: Any? get() = null
|
||||||
|
|
||||||
@ -549,7 +549,7 @@ private class CombinedScope(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class CommandSenderAsMessageScope(
|
private class CommandSenderAsMessageScope(
|
||||||
private val sender: CommandSender
|
private val sender: CommandSender,
|
||||||
) : MessageScope {
|
) : MessageScope {
|
||||||
override val realTarget: Any?
|
override val realTarget: Any?
|
||||||
get() = sender.user ?: sender // ConsoleCommandSender
|
get() = sender.user ?: sender // ConsoleCommandSender
|
||||||
@ -564,7 +564,7 @@ private class CommandSenderAsMessageScope(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class ContactAsMessageScope(
|
private class ContactAsMessageScope(
|
||||||
private val sender: Contact
|
private val sender: Contact,
|
||||||
) : MessageScope {
|
) : MessageScope {
|
||||||
override val realTarget: Any?
|
override val realTarget: Any?
|
||||||
get() = sender
|
get() = sender
|
||||||
|
Loading…
Reference in New Issue
Block a user