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
f0c75277
Commit
f0c75277
authored
Nov 15, 2019
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix RequestFriendImageId
parent
046d8968
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
4 deletions
+5
-4
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/internal/MessageDataInternal.kt
...n/net.mamoe.mirai/message/internal/MessageDataInternal.kt
+1
-1
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/action/AddContact.kt
...oe.mirai/network/protocol/tim/packet/action/AddContact.kt
+1
-1
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/OutputUtils.kt
...commonMain/kotlin/net.mamoe.mirai/utils/io/OutputUtils.kt
+2
-2
mirai-demos/mirai-demo-gentleman/src/main/kotlin/demo/gentleman/Main.kt
...rai-demo-gentleman/src/main/kotlin/demo/gentleman/Main.kt
+1
-0
No files found.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/internal/MessageDataInternal.kt
View file @
f0c75277
...
@@ -12,7 +12,7 @@ internal fun IoBuffer.parseMessageFace(): Face {
...
@@ -12,7 +12,7 @@ internal fun IoBuffer.parseMessageFace(): Face {
discardExact
(
1
)
discardExact
(
1
)
val
id1
=
FaceID
.
ofId
(
readLVNumber
().
toInt
().
toUByte
())
//可能这个是id, 也可能下面那个
val
id1
=
FaceID
.
ofId
(
readLVNumber
().
toInt
().
toUByte
())
//可能这个是id, 也可能下面那个
discardExact
(
readByte
().
toLong
())
discardExact
(
readByte
().
toLong
())
// -1
readLVNumber
()
//某id?
readLVNumber
()
//某id?
return
Face
(
id1
)
return
Face
(
id1
)
}
}
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/network/protocol/tim/packet/action/AddContact.kt
View file @
f0c75277
...
@@ -104,7 +104,7 @@ object CanAddFriendPacket : SessionPacketFactory<CanAddFriendResponse>() {
...
@@ -104,7 +104,7 @@ object CanAddFriendPacket : SessionPacketFactory<CanAddFriendResponse>() {
}
}
val
qq
:
QQ
=
readUInt
().
qq
()
val
qq
:
QQ
=
readUInt
().
qq
()
d
iscardExact
(
1
)
// debugD
iscardExact(1)
return
when
(
val
state
=
readUByte
().
toUInt
())
{
return
when
(
val
state
=
readUByte
().
toUInt
())
{
//09 4E A4 B1 00 03
//09 4E A4 B1 00 03
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/OutputUtils.kt
View file @
f0c75277
...
@@ -59,13 +59,13 @@ fun BytePacketBuilder.writeHex(uHex: String) {
...
@@ -59,13 +59,13 @@ fun BytePacketBuilder.writeHex(uHex: String) {
fun
BytePacketBuilder
.
writeTLV
(
tag
:
UByte
,
values
:
UByteArray
)
{
fun
BytePacketBuilder
.
writeTLV
(
tag
:
UByte
,
values
:
UByteArray
)
{
writeUByte
(
tag
)
writeUByte
(
tag
)
write
VarInt
(
values
.
size
)
write
UVarInt
(
values
.
size
.
toUInt
()
)
writeFully
(
values
)
writeFully
(
values
)
}
}
fun
BytePacketBuilder
.
writeTLV
(
tag
:
UByte
,
values
:
ByteArray
)
{
fun
BytePacketBuilder
.
writeTLV
(
tag
:
UByte
,
values
:
ByteArray
)
{
writeUByte
(
tag
)
writeUByte
(
tag
)
write
VarInt
(
values
.
size
)
write
UVarInt
(
values
.
size
.
toUInt
()
)
writeFully
(
values
)
writeFully
(
values
)
}
}
...
...
mirai-demos/mirai-demo-gentleman/src/main/kotlin/demo/gentleman/Main.kt
View file @
f0c75277
...
@@ -54,6 +54,7 @@ suspend fun main() {
...
@@ -54,6 +54,7 @@ suspend fun main() {
bot
.
subscribeMessages
{
bot
.
subscribeMessages
{
"你好"
reply
"你好!"
"你好"
reply
"你好!"
"profile"
reply
{
"profile"
reply
{
sender
.
profile
.
await
().
toString
()
sender
.
profile
.
await
().
toString
()
}
}
...
...
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