Him188 5 年之前
父節點
當前提交
bb6cac3261

+ 4 - 2
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/PbMessageSvc.kt

@@ -101,13 +101,15 @@ internal class PbMessageSvc {
                                     )
                                 )
                             ),
-                            reserved = "08 01 10 E3 E9 D6 80 02".hexToBytes()
+                            reserved = RESERVED_TEMP
                         )
                     )
                 )
             )
         }
 
+        private val RESERVED_TEMP = "08 01 10 E3 E9 D6 80 02".hexToBytes()
+
         fun createForFriendMessage(
             client: QQAndroidClient,
             toUin: Long,
@@ -136,7 +138,7 @@ internal class PbMessageSvc {
                                     )
                                 )
                             ),
-                            reserved = "08 00".hexToBytes()
+                            reserved = byteArrayOf(0x08, 0x00)
                         )
                     )
                 )

+ 0 - 3
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/conversion.kt

@@ -11,9 +11,6 @@
 
 package net.mamoe.mirai.qqandroid.utils
 
-import kotlin.random.Random
-import kotlin.random.nextInt
-
 /*
  * 类型转换 Utils.
  * 这些函数为内部函数, 可能会改变