Ignore unrecognized message types on messageToElems transformation

This commit is contained in:
Him188 2021-02-03 08:28:02 +08:00
parent b659d55fec
commit e381a2b33f

View File

@ -238,7 +238,10 @@ internal fun MessageChain.toRichTextElems(
is InternalFlagOnlyMessage, is ShowImageFlag -> { is InternalFlagOnlyMessage, is ShowImageFlag -> {
// ignore // ignore
} }
else -> error("unsupported message type: ${currentMessage::class.simpleName}") else -> {
// unrecognized types are ignored
// error("unsupported message type: ${currentMessage::class.simpleName}")
}
} }
} }
this.forEach(::transformOneMessage) this.forEach(::transformOneMessage)