Fix LightApp refining; fix #1660

This commit is contained in:
Karlatemp 2021-11-20 18:15:09 +08:00
parent 511d1fa4f8
commit a35a19ffcc
No known key found for this signature in database
GPG Key ID: 21FBDDF664FF06F8

View File

@ -26,7 +26,7 @@ internal data class LightAppInternal(
val struct = tryDeserialize() ?: return LightApp(content)
struct.run {
if (meta.music != null) {
MusicKind.values().find { it.appId.toInt() == meta.music.appid }?.let { musicType ->
MusicKind.values().find { it.appId == meta.music.appid }?.let { musicType ->
meta.music.run {
return MessageOrigin(
LightApp(content),
@ -121,7 +121,7 @@ internal data class LightAppStruct(
@SerialName("autosize")
val autosize: Boolean = false,
@SerialName("ctime")
val ctime: Int = 0,
val ctime: Long = 0,
@SerialName("forward")
val forward: Boolean = false,
@SerialName("token")
@ -133,11 +133,11 @@ internal data class LightAppStruct(
@Serializable
data class Extra(
@SerialName("app_type")
val appType: Int = 0,
val appType: Long = 0,
@SerialName("appid")
val appid: Int = 0,
val appid: Long = 0,
@SerialName("uin")
val uin: Int = 0,
val uin: Long = 0,
)
@Serializable
@ -152,9 +152,9 @@ internal data class LightAppStruct(
@SerialName("android_pkg_name")
val androidPkgName: String = "",
@SerialName("app_type")
val appType: Int = 0,
val appType: Long = 0,
@SerialName("appid")
val appid: Int = 0,
val appid: Long = 0,
@SerialName("desc")
val desc: String = "",
@SerialName("jumpUrl")