Add Message.isPlain, Message.isNotPlain

This commit is contained in:
Him188 2020-04-20 21:52:22 +08:00
parent edd823c7bc
commit f845b5cded

View File

@ -214,6 +214,9 @@ interface Message {
this.followedByInternalForBinaryCompatibility(another.toString().toMessage())
}
inline fun Message.isPlain(): Boolean = this is PlainText
inline fun Message.isNotPlain(): Boolean = this !is PlainText
@JvmSynthetic
@Suppress("UNCHECKED_CAST")