mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-31 03:22:36 +08:00
Fix build
This commit is contained in:
parent
4404af3071
commit
6ee8305566
@ -24,6 +24,7 @@ import net.mamoe.mirai.event.events.NewFriendRequestEvent
|
||||
import net.mamoe.mirai.internal.contact.*
|
||||
import net.mamoe.mirai.internal.message.*
|
||||
import net.mamoe.mirai.internal.network.highway.HighwayHelper
|
||||
import net.mamoe.mirai.internal.network.protocol.data.jce.SvcDevLoginInfo
|
||||
import net.mamoe.mirai.internal.network.protocol.data.proto.ImMsgBody
|
||||
import net.mamoe.mirai.internal.network.protocol.data.proto.LongMsg
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.chat.*
|
||||
@ -164,6 +165,13 @@ internal open class MiraiImpl : IMirai, LowLevelApiAccessor {
|
||||
StatSvc.GetDevLoginInfo(bot.client).sendAndExpect<StatSvc.GetDevLoginInfo.Response>()
|
||||
}
|
||||
|
||||
fun SvcDevLoginInfo.toOtherClientInfo() = OtherClientInfo(
|
||||
iAppId.toInt(),
|
||||
Platform.getByTerminalId(iTerType?.toInt() ?: 0) ?: Platform.UNKNOWN,
|
||||
deviceName.orEmpty(),
|
||||
deviceTypeInfo.orEmpty()
|
||||
)
|
||||
|
||||
return response.deviceList.map { it.toOtherClientInfo() }
|
||||
}
|
||||
|
||||
|
@ -10,8 +10,6 @@
|
||||
package net.mamoe.mirai.internal.network.protocol.data.jce
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.contact.OtherClientInfo
|
||||
import net.mamoe.mirai.contact.Platform
|
||||
import net.mamoe.mirai.utils.JceStruct
|
||||
import net.mamoe.mirai.utils.serialization.tars.TarsId
|
||||
|
||||
@ -30,14 +28,6 @@ internal data class SvcDevLoginInfo(
|
||||
@JvmField @TarsId(10) val iCanBeKicked: Long? = null // isOnline
|
||||
) : JceStruct
|
||||
|
||||
internal fun SvcDevLoginInfo.toOtherClientInfo() = OtherClientInfo(
|
||||
iAppId.toInt(),
|
||||
Platform.getByTerminalId(iTerType?.toInt() ?: 0) ?: Platform.UNKNOWN,
|
||||
deviceName.orEmpty(),
|
||||
deviceTypeInfo.orEmpty()
|
||||
)
|
||||
|
||||
|
||||
/*
|
||||
vecCurrentLoginDevInfo=[SvcDevLoginInfo#1676411955 {
|
||||
deviceName=mirai
|
||||
|
Loading…
Reference in New Issue
Block a user