Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
9c152873
Commit
9c152873
authored
Feb 03, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix missing file
parent
b240370f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
9 deletions
+26
-9
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt
...ommonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt
+3
-3
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/highway/Codec.kt
...kotlin/net/mamoe/mirai/qqandroid/network/highway/Codec.kt
+4
-5
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/PacketFactory.kt
.../mirai/qqandroid/network/protocol/packet/PacketFactory.kt
+1
-0
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/type.kt
...commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/type.kt
+16
-0
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/utils/ExternalImageAndroid.kt
...Main/kotlin/net/mamoe/mirai/utils/ExternalImageAndroid.kt
+2
-1
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/ContactImpl.kt
View file @
9c152873
...
@@ -163,12 +163,11 @@ internal class GroupImpl(
...
@@ -163,12 +163,11 @@ internal class GroupImpl(
Highway
.
RequestDataTrans
(
Highway
.
RequestDataTrans
(
uin
=
bot
.
uin
,
uin
=
bot
.
uin
,
command
=
"PicUp.DataUp"
,
command
=
"PicUp.DataUp"
,
buildVer
=
bot
.
client
.
buildVer
,
sequenceId
=
bot
.
client
.
nextHighwayDataTransSequenceId
()
,
uKey
=
response
.
uKey
,
uKey
=
response
.
uKey
,
data
=
image
.
input
,
data
=
image
.
input
,
dataSize
=
image
.
inputSize
.
toInt
(),
dataSize
=
image
.
inputSize
.
toInt
(),
md5
=
image
.
md5
,
md5
=
image
.
md5
sequenceId
=
bot
.
client
.
nextHighwayDataTransSequenceId
()
)
)
)
)
// }
// }
...
@@ -182,6 +181,7 @@ internal class GroupImpl(
...
@@ -182,6 +181,7 @@ internal class GroupImpl(
println
(
proto
.
contentToString
())
println
(
proto
.
contentToString
())
println
(
readBytes
(
bodyLength
).
toUHexString
())
println
(
readBytes
(
bodyLength
).
toUHexString
())
}
}
socket
.
close
()
val
resourceId
=
image
.
calculateImageResourceId
()
val
resourceId
=
image
.
calculateImageResourceId
()
return
NotOnlineImageFromFile
(
return
NotOnlineImageFromFile
(
resourceId
=
resourceId
,
resourceId
=
resourceId
,
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/highway/Codec.kt
View file @
9c152873
...
@@ -67,13 +67,12 @@ object Highway {
...
@@ -67,13 +67,12 @@ object Highway {
uin
:
Long
,
uin
:
Long
,
command
:
String
,
command
:
String
,
sequenceId
:
Int
,
sequenceId
:
Int
,
buildVer
:
String
,
appId
:
Int
=
537062845
,
appId
:
Int
=
537062845
,
dataFlag
:
Int
=
4096
,
dataFlag
:
Int
=
4096
,
commandId
:
Int
=
2
,
commandId
:
Int
=
2
,
localId
:
Int
=
2052
,
localId
:
Int
=
2052
,
uKey
:
ByteArray
,
uKey
:
ByteArray
,
data
:
Input
,
data
:
Input
,
dataSize
:
Int
,
dataSize
:
Int
,
md5
:
ByteArray
md5
:
ByteArray
...
@@ -87,7 +86,6 @@ object Highway {
...
@@ -87,7 +86,6 @@ object Highway {
appid
=
appId
,
appid
=
appId
,
dataflag
=
dataFlag
,
dataflag
=
dataFlag
,
commandId
=
commandId
,
commandId
=
commandId
,
buildVer
=
buildVer
,
localeId
=
localId
localeId
=
localId
)
)
val
segHead
=
CSDataHighwayHead
.
SegHead
(
val
segHead
=
CSDataHighwayHead
.
SegHead
(
...
@@ -97,6 +95,7 @@ object Highway {
...
@@ -97,6 +95,7 @@ object Highway {
md5
=
md5
,
md5
=
md5
,
fileMd5
=
md5
fileMd5
=
md5
)
)
//println(data.readBytes().toUHexString())
return
Codec
.
buildC2SData
(
dataHighwayHead
,
segHead
,
EMPTY_BYTE_ARRAY
,
null
,
data
,
dataSize
)
return
Codec
.
buildC2SData
(
dataHighwayHead
,
segHead
,
EMPTY_BYTE_ARRAY
,
null
,
data
,
dataSize
)
}
}
...
@@ -121,9 +120,9 @@ object Highway {
...
@@ -121,9 +120,9 @@ object Highway {
writeInt
(
head
.
size
)
writeInt
(
head
.
size
)
writeInt
(
bodySize
)
writeInt
(
bodySize
)
writeFully
(
head
)
writeFully
(
head
)
body
.
copyTo
(
this
)
check
(
body
.
copyTo
(
this
).
toInt
()
==
bodySize
)
{
"bad body size"
}
writeByte
(
41
)
writeByte
(
41
)
}
}
.
also
{
println
(
it
.
remaining
)
}
}
}
}
}
}
}
\ No newline at end of file
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/PacketFactory.kt
View file @
9c152873
...
@@ -5,6 +5,7 @@ import kotlinx.io.pool.useInstance
...
@@ -5,6 +5,7 @@ import kotlinx.io.pool.useInstance
import
net.mamoe.mirai.data.Packet
import
net.mamoe.mirai.data.Packet
import
net.mamoe.mirai.event.Subscribable
import
net.mamoe.mirai.event.Subscribable
import
net.mamoe.mirai.qqandroid.QQAndroidBot
import
net.mamoe.mirai.qqandroid.QQAndroidBot
import
net.mamoe.mirai.qqandroid.network.protocol.packet.chat.TroopManagement
import
net.mamoe.mirai.qqandroid.network.protocol.packet.chat.image.ImageUpPacket
import
net.mamoe.mirai.qqandroid.network.protocol.packet.chat.image.ImageUpPacket
import
net.mamoe.mirai.qqandroid.network.protocol.packet.chat.image.ImgStore
import
net.mamoe.mirai.qqandroid.network.protocol.packet.chat.image.ImgStore
import
net.mamoe.mirai.qqandroid.network.protocol.packet.chat.image.LongConn
import
net.mamoe.mirai.qqandroid.network.protocol.packet.chat.image.LongConn
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/type.kt
0 → 100644
View file @
9c152873
package
net.mamoe.mirai.qqandroid.utils
fun
Int
.
toIpV4AddressString
():
String
{
@Suppress
(
"NAME_SHADOWING"
)
var
var0
=
this
.
toLong
()
and
0
xFFFFFFFF
return
buildString
{
for
(
var2
in
3
downTo
0
)
{
append
(
255L
and
var0
%
256L
)
var0
/=
256L
if
(
var2
!=
0
)
{
append
(
'.'
)
}
}
}
}
\ No newline at end of file
mirai-core/src/androidMain/kotlin/net/mamoe/mirai/utils/ExternalImageAndroid.kt
View file @
9c152873
...
@@ -34,7 +34,8 @@ fun File.toExternalImage(): ExternalImage {
...
@@ -34,7 +34,8 @@ fun File.toExternalImage(): ExternalImage {
md5
=
this
.
inputStream
().
use
{
it
.
md5
()
},
md5
=
this
.
inputStream
().
use
{
it
.
md5
()
},
imageFormat
=
this
.
nameWithoutExtension
,
imageFormat
=
this
.
nameWithoutExtension
,
input
=
this
.
inputStream
().
asInput
(
IoBuffer
.
Pool
),
input
=
this
.
inputStream
().
asInput
(
IoBuffer
.
Pool
),
inputSize
=
this
.
length
()
inputSize
=
this
.
length
(),
filename
=
this
.
name
)
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment