mirror of
https://github.com/whitechi73/OpenShamrock.git
synced 2024-08-14 13:12:17 +08:00
Shamrock
: fix 重複したグループ参加イベントを削除する
This commit is contained in:
parent
1a814e565a
commit
75a567d5cd
@ -81,13 +81,7 @@ internal object PrimitiveListener {
|
|||||||
732 -> when(subType) {
|
732 -> when(subType) {
|
||||||
12 -> onGroupBan(msgTime, pb)
|
12 -> onGroupBan(msgTime, pb)
|
||||||
16 -> onGroupTitleChange(msgTime, pb)
|
16 -> onGroupTitleChange(msgTime, pb)
|
||||||
17 -> {
|
17 -> onGroupRecall(msgTime, pb)
|
||||||
try {
|
|
||||||
onGroupRecall(msgTime, pb)
|
|
||||||
// invite
|
|
||||||
onGroupMemIncreased(msgTime, pb)
|
|
||||||
} finally { }
|
|
||||||
}
|
|
||||||
20 -> onGroupPoke(msgTime, pb)
|
20 -> onGroupPoke(msgTime, pb)
|
||||||
21 -> onEssenceMessage(msgTime, pb)
|
21 -> onEssenceMessage(msgTime, pb)
|
||||||
}
|
}
|
||||||
@ -287,31 +281,6 @@ internal object PrimitiveListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun onGroupMemIncreased(time: Long, pb: ProtoMap) {
|
private suspend fun onGroupMemIncreased(time: Long, pb: ProtoMap) {
|
||||||
when(pb[1, 2, 1].asInt) {
|
|
||||||
732 -> {
|
|
||||||
// invite
|
|
||||||
val groupCode = pb[1, 3, 2, 4].asULong
|
|
||||||
lateinit var target: String
|
|
||||||
lateinit var operation: String
|
|
||||||
pb[1, 3, 2, 26, 7].asList
|
|
||||||
.value
|
|
||||||
.forEach {
|
|
||||||
val value = it[2].asUtf8String
|
|
||||||
when (it[1].asUtf8String) {
|
|
||||||
"invitee" -> operation = value
|
|
||||||
"invitor" -> target = value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
val type = 131
|
|
||||||
LogCenter.log("群成员增加($groupCode): $target, type = $type")
|
|
||||||
|
|
||||||
if(!GlobalEventTransmitter.GroupNoticeTransmitter
|
|
||||||
.transGroupMemberNumChanged(time, target.toLong(), groupCode, operation.toLong(), NoticeType.GroupMemIncrease, NoticeSubType.Invite)) {
|
|
||||||
LogCenter.log("群成员增加推送失败!", Level.WARN)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
33 -> {
|
|
||||||
// approve
|
|
||||||
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
|
||||||
@ -328,8 +297,6 @@ internal object PrimitiveListener {
|
|||||||
LogCenter.log("群成员增加推送失败!", Level.WARN)
|
LogCenter.log("群成员增加推送失败!", Level.WARN)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private suspend fun onGroupMemberDecreased(time: Long, pb: ProtoMap) {
|
private suspend fun onGroupMemberDecreased(time: Long, pb: ProtoMap) {
|
||||||
val groupCode = pb[1, 3, 2, 1].asULong
|
val groupCode = pb[1, 3, 2, 1].asULong
|
||||||
|
Loading…
x
Reference in New Issue
Block a user