Fix MessageSource.ensureSequenceIdAvailable()

fix #930
This commit is contained in:
Karlatemp 2021-01-28 21:06:54 +08:00
parent 60190d373c
commit 1f5f0e269c
No known key found for this signature in database
GPG Key ID: 21FBDDF664FF06F8

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)