mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-05 08:30:11 +08:00
Fix MarketFace contentToString, return '[商城表情]' if original name is empty (#2030)
This commit is contained in:
parent
0d3bc9c684
commit
c6b47a3231
@ -35,7 +35,7 @@ public interface MarketFace : HummerMessage {
|
|||||||
|
|
||||||
override val key: MessageKey<MarketFace> get() = Key
|
override val key: MessageKey<MarketFace> get() = Key
|
||||||
|
|
||||||
override fun contentToString(): String = name
|
override fun contentToString(): String = name.ifEmpty { "[商城表情]" }
|
||||||
|
|
||||||
public companion object Key :
|
public companion object Key :
|
||||||
AbstractPolymorphicMessageKey<HummerMessage, MarketFace>(HummerMessage, { it.safeCast() }) {
|
AbstractPolymorphicMessageKey<HummerMessage, MarketFace>(HummerMessage, { it.safeCast() }) {
|
||||||
|
Loading…
Reference in New Issue
Block a user