mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-23 22:00:10 +08:00
Use long image size
This commit is contained in:
parent
c572a7e434
commit
248ed34155
@ -116,7 +116,7 @@ internal abstract class AbstractUser(
|
||||
uin = bot.id,
|
||||
groupCode = id,
|
||||
md5 = resource.md5,
|
||||
size = resource.size.toInt()
|
||||
size = resource.size
|
||||
).sendAndExpect(bot)
|
||||
|
||||
when (response) {
|
||||
|
@ -144,7 +144,7 @@ internal class GroupImpl(
|
||||
uin = bot.id,
|
||||
groupCode = id,
|
||||
md5 = resource.md5,
|
||||
size = resource.size.toInt()
|
||||
size = resource.size
|
||||
).sendAndExpect()
|
||||
|
||||
when (response) {
|
||||
|
@ -680,7 +680,7 @@ internal class ImMsgBody : ProtoBuf {
|
||||
@Serializable
|
||||
internal class NotOnlineImage(
|
||||
@ProtoNumber(1) @JvmField val filePath: String = "",
|
||||
@ProtoNumber(2) @JvmField val fileLen: Int = 0,
|
||||
@ProtoNumber(2) @JvmField val fileLen: Long = 0L, // originally int
|
||||
@ProtoNumber(3) @JvmField val downloadPath: String = "",
|
||||
@ProtoNumber(4) @JvmField val oldVerSendFile: ByteArray = EMPTY_BYTE_ARRAY,
|
||||
@ProtoNumber(5) @JvmField val imgType: Int = 0,
|
||||
|
@ -19,7 +19,6 @@ import net.mamoe.mirai.internal.network.protocol.packet.OutgoingPacketFactory
|
||||
import net.mamoe.mirai.internal.network.protocol.packet.buildOutgoingUniPacket
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.readProtoBuf
|
||||
import net.mamoe.mirai.internal.utils.io.serialization.writeProtoBuf
|
||||
import net.mamoe.mirai.utils.toLongUnsigned
|
||||
import kotlin.random.Random
|
||||
import kotlin.random.nextInt
|
||||
|
||||
@ -39,7 +38,7 @@ internal class ImgStore {
|
||||
uin: Long,
|
||||
groupCode: Long,
|
||||
md5: ByteArray,
|
||||
size: Int,
|
||||
size: Long,
|
||||
picWidth: Int = 0, // not orthodox
|
||||
picHeight: Int = 0, // not orthodox
|
||||
picType: Int = 1000,
|
||||
@ -61,7 +60,7 @@ internal class ImgStore {
|
||||
groupCode = groupCode,
|
||||
srcUin = uin,
|
||||
fileMd5 = md5,
|
||||
fileSize = size.toLongUnsigned(),
|
||||
fileSize = size,
|
||||
fileId = fileId,
|
||||
fileName = filename,
|
||||
picWidth = picWidth,
|
||||
|
Loading…
Reference in New Issue
Block a user