Merge remote-tracking branch 'mirai/dev' into dev

This commit is contained in:
Him188 2021-01-29 10:23:42 +08:00
commit 559d6a7039
2 changed files with 6 additions and 16 deletions

View File

@ -12,7 +12,7 @@
import org.gradle.api.attributes.Attribute
object Versions {
const val project = "2.2.0-dev-6"
const val project = "2.2.0-dev-7"
const val core = project
const val console = project

View File

@ -49,25 +49,15 @@ internal interface MessageSourceInternal {
}
@Suppress("RedundantSuspendModifier", "unused")
internal suspend inline fun MessageSource.ensureSequenceIdAvailable() {
// obsolete but keep for future
return
/*
if (this is MessageSourceToGroupImpl) {
this.ensureSequenceIdAvailable()
}*/
internal suspend fun MessageSource.ensureSequenceIdAvailable() {
if (this is OnlineMessageSourceToGroupImpl) {
ensureSequenceIdAvailable()
}
}
@Suppress("RedundantSuspendModifier", "unused")
internal suspend inline fun Message.ensureSequenceIdAvailable() {
// no suspend.
// obsolete but keep for future
return
/*
if (this is MessageSourceToGroupImpl) {
this.ensureSequenceIdAvailable()
}*/
(this as? MessageChain)?.sourceOrNull?.ensureSequenceIdAvailable()
}
@Serializable(OnlineMessageSourceFromFriendImpl.Serializer::class)