Commit 227a22d3 authored by Him188's avatar Him188

Ignore receipt events

parent 8f03d44d
...@@ -157,6 +157,8 @@ internal class OnlinePush { ...@@ -157,6 +157,8 @@ internal class OnlinePush {
val reqPushMsg = decodeUniPacket(OnlinePushPack.SvcReqPushMsg.serializer(), "req") val reqPushMsg = decodeUniPacket(OnlinePushPack.SvcReqPushMsg.serializer(), "req")
reqPushMsg.vMsgInfos.forEach { msgInfo: MsgInfo -> reqPushMsg.vMsgInfos.forEach { msgInfo: MsgInfo ->
msgInfo.vMsg!!.read { msgInfo.vMsg!!.read {
// TODO: 2020/2/13 可能会同时收到多个事件. 使用 map 而不要直接 return
when { when {
msgInfo.shMsgType.toInt() == 732 -> { msgInfo.shMsgType.toInt() == 732 -> {
val group = bot.getGroup(this.readUInt().toLong()) val group = bot.getGroup(this.readUInt().toLong())
...@@ -164,7 +166,11 @@ internal class OnlinePush { ...@@ -164,7 +166,11 @@ internal class OnlinePush {
when (val internalType = this.readShort().toInt()) { when (val internalType = this.readShort().toInt()) {
3073 -> { // mute 3073 -> { // mute
val operator = group[this.readUInt().toLong()] val operatorUin = this.readUInt().toLong()
if (operatorUin == bot.uin) {
return NoPacket
}
val operator = group[operatorUin]
this.readUInt().toLong() // time this.readUInt().toLong() // time
this.discardExact(2) this.discardExact(2)
val target = this.readUInt().toLong() val target = this.readUInt().toLong()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment