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
c7ab173a
Commit
c7ab173a
authored
Jun 14, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add bug report hints
parent
d7ab2c1b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
1 deletion
+20
-1
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.PbPushTransMsg.kt
...protocol/packet/chat/receive/OnlinePush.PbPushTransMsg.kt
+10
-0
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.ReqPush.kt
...etwork/protocol/packet/chat/receive/OnlinePush.ReqPush.kt
+1
-0
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/contentToString.kt
...kotlin/net/mamoe/mirai/qqandroid/utils/contentToString.kt
+6
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Exceptions.kt
...c/commonMain/kotlin/net.mamoe.mirai/contact/Exceptions.kt
+3
-1
No files found.
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.PbPushTransMsg.kt
View file @
c7ab173a
...
@@ -27,11 +27,13 @@ import net.mamoe.mirai.qqandroid.QQAndroidBot
...
@@ -27,11 +27,13 @@ import net.mamoe.mirai.qqandroid.QQAndroidBot
import
net.mamoe.mirai.qqandroid.contact.GroupImpl
import
net.mamoe.mirai.qqandroid.contact.GroupImpl
import
net.mamoe.mirai.qqandroid.contact.MemberImpl
import
net.mamoe.mirai.qqandroid.contact.MemberImpl
import
net.mamoe.mirai.qqandroid.contact.checkIsMemberImpl
import
net.mamoe.mirai.qqandroid.contact.checkIsMemberImpl
import
net.mamoe.mirai.qqandroid.message.contextualBugReportException
import
net.mamoe.mirai.qqandroid.network.Packet
import
net.mamoe.mirai.qqandroid.network.Packet
import
net.mamoe.mirai.qqandroid.network.protocol.data.proto.OnlinePushTrans
import
net.mamoe.mirai.qqandroid.network.protocol.data.proto.OnlinePushTrans
import
net.mamoe.mirai.qqandroid.network.protocol.packet.IncomingPacketFactory
import
net.mamoe.mirai.qqandroid.network.protocol.packet.IncomingPacketFactory
import
net.mamoe.mirai.qqandroid.network.protocol.packet.OutgoingPacket
import
net.mamoe.mirai.qqandroid.network.protocol.packet.OutgoingPacket
import
net.mamoe.mirai.qqandroid.network.protocol.packet.buildResponseUniPacket
import
net.mamoe.mirai.qqandroid.network.protocol.packet.buildResponseUniPacket
import
net.mamoe.mirai.qqandroid.utils._miraiContentToString
import
net.mamoe.mirai.qqandroid.utils.io.serialization.readProtoBuf
import
net.mamoe.mirai.qqandroid.utils.io.serialization.readProtoBuf
import
net.mamoe.mirai.qqandroid.utils.read
import
net.mamoe.mirai.qqandroid.utils.read
...
@@ -131,6 +133,14 @@ internal object OnlinePushPbPushTransMsg :
...
@@ -131,6 +133,14 @@ internal object OnlinePushPbPushTransMsg :
}
}
}
}
}
}
else
->
{
throw
contextualBugReportException
(
"解析 OnlinePush.PbPushTransMsg, msgType=${content.msgType}"
,
content
.
_miraiContentToString
(),
null
,
"并描述此时机器人是否被踢出, 或是否有成员列表变更等动作."
)
}
}
}
}
}
return
null
return
null
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/OnlinePush.ReqPush.kt
View file @
c7ab173a
...
@@ -390,6 +390,7 @@ internal object Transformers528 : Map<Long, Lambda528> by mapOf(
...
@@ -390,6 +390,7 @@ internal object Transformers528 : Map<Long, Lambda528> by mapOf(
},
},
// bot 在其他客户端被踢或主动退出而同步情况
// bot 在其他客户端被踢或主动退出而同步情况
0
xD4L
to
lambda528
{
bot
->
0
xD4L
to
lambda528
{
bot
->
// this.soutv("0x210")
@Serializable
@Serializable
data class
SubD4
(
data class
SubD4
(
// ok
// ok
...
...
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/utils/contentToString.kt
View file @
c7ab173a
...
@@ -149,6 +149,12 @@ private fun Any.canBeIgnored(): Boolean {
...
@@ -149,6 +149,12 @@ private fun Any.canBeIgnored(): Boolean {
is
ByteArray
->
this
.
isEmpty
()
is
ByteArray
->
this
.
isEmpty
()
is
Array
<
*
>
->
this
.
isEmpty
()
is
Array
<
*
>
->
this
.
isEmpty
()
is
Number
->
this
==
0
is
Number
->
this
==
0
is
Int
->
this
==
0
is
Float
->
this
==
0
is
Double
->
this
==
0
is
Byte
->
this
==
0
is
Short
->
this
==
0
is
Long
->
this
==
0
else
->
false
else
->
false
}
}
}
}
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/Exceptions.kt
View file @
c7ab173a
...
@@ -12,6 +12,8 @@
...
@@ -12,6 +12,8 @@
package
net.mamoe.mirai.contact
package
net.mamoe.mirai.contact
import
net.mamoe.mirai.message.data.Message
import
net.mamoe.mirai.message.data.Message
import
net.mamoe.mirai.utils.asHumanReadable
import
kotlin.time.seconds
/**
/**
* 发送消息时消息过长抛出的异常.
* 发送消息时消息过长抛出的异常.
...
@@ -38,6 +40,6 @@ class MessageTooLargeException(
...
@@ -38,6 +40,6 @@ class MessageTooLargeException(
*/
*/
class
BotIsBeingMutedException
(
class
BotIsBeingMutedException
(
val
target
:
Group
val
target
:
Group
)
:
RuntimeException
(
"bot is being muted, remaining ${target.botMuteRemaining} seconds"
)
)
:
RuntimeException
(
"bot is being muted, remaining ${target.botMuteRemaining
.seconds.asHumanReadable
} seconds"
)
inline
val
BotIsBeingMutedException
.
botMuteRemaining
:
Int
get
()
=
target
.
botMuteRemaining
inline
val
BotIsBeingMutedException
.
botMuteRemaining
:
Int
get
()
=
target
.
botMuteRemaining
\ No newline at end of file
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