Shamrock: fix card event and kickme operation

This commit is contained in:
ikechan8370 2023-12-13 15:09:46 +08:00
parent 135a7c2f56
commit 4ef014a8ac

View File

@ -88,7 +88,7 @@ internal object PrimitiveListener {
} }
} }
} catch (e: Exception) { } catch (e: Exception) {
LogCenter.log("onMsgPush(msgType: $msgType): "+e.stackTraceToString(), Level.WARN) LogCenter.log("onMsgPush(msgType: $msgType, subType: $subType): "+e.stackTraceToString(), Level.WARN)
} }
} }
@ -180,7 +180,7 @@ internal object PrimitiveListener {
newCard = it[2].asUtf8String newCard = it[2].asUtf8String
} }
} }
val groupId = pb[1, 13, 4].asLong val groupId = detail[1, 13, 4].asLong
var oldCard = "" var oldCard = ""
val targetQQ = ContactHelper.getUinByUidAsync(targetId).toLong() val targetQQ = ContactHelper.getUinByUidAsync(targetId).toLong()
LogCenter.log("群组[$groupId]成员$targetQQ 群名片变动 -> $newCard") LogCenter.log("群组[$groupId]成员$targetQQ 群名片变动 -> $newCard")
@ -343,7 +343,7 @@ internal object PrimitiveListener {
} }
else -> { else -> {
LogCenter.log("onGroupPokeAndGroupSign unknown type ${detail[2].asInt}", Level.WARN) LogCenter.log("onGroupPokeAndGroupSign unknown type ${detail[26, 2].asInt}", Level.WARN)
} }
} }
} }
@ -393,8 +393,11 @@ internal object PrimitiveListener {
val groupCode = pb[1, 3, 2, 1].asULong val groupCode = pb[1, 3, 2, 1].asULong
val targetUid = pb[1, 3, 2, 3].asUtf8String val targetUid = pb[1, 3, 2, 3].asUtf8String
val type = pb[1, 3, 2, 4].asInt val type = pb[1, 3, 2, 4].asInt
val operation = ContactHelper.getUinByUidAsync(pb[1, 3, 2, 5].asUtf8String).toLong() val operation = try {
ContactHelper.getUinByUidAsync(pb[1, 3, 2, 5, 1, 1].asUtf8String).toLong()
} catch (e: Throwable) {
ContactHelper.getUinByUidAsync(pb[1, 3, 2, 5].asUtf8String).toLong()
}
val target = ContactHelper.getUinByUidAsync(targetUid).toLong() val target = ContactHelper.getUinByUidAsync(targetUid).toLong()
val subtype = when (type) { val subtype = when (type) {
130 -> NoticeSubType.Leave 130 -> NoticeSubType.Leave