2 Commits

Author SHA1 Message Date
2db187e3d5 (#319) 2024-04-11 12:41:23 +08:00
18ec586b12 试着修复group_increase事件在大群中依然可能出现target_id=0的故障 (#318) 2024-04-11 01:04:52 +08:00
2 changed files with 14 additions and 4 deletions

View File

@ -3,7 +3,7 @@ name: Build Shamrock APK
on:
workflow_dispatch:
push:
branches: [ master ]
branches: [ v1.0.9 ]
paths-ignore:
- '**.md'
- '**.txt'

View File

@ -372,8 +372,18 @@ internal object PrimitiveListener {
}
val operatorUid = event.operatorUid
val operator = ContactHelper.getUinByUidAsync(operatorUid).toLong()
val target = ContactHelper.getUinByUidAsync(targetUid).toLong()
var operator = ContactHelper.getUinByUidAsync(operatorUid).toLong()
var target = ContactHelper.getUinByUidAsync(targetUid).toLong()
if (target== 0.toLong()){
GroupSvc.getTroopMemberInfoByUid(groupCode,targetUid).onSuccess {
target=it.uin
}
}
if (operator== 0.toLong()){
GroupSvc.getTroopMemberInfoByUid(groupCode,operatorUid).onSuccess {
operator=it.uin
}
}
LogCenter.log("群成员增加($groupCode): $target, type = $type")
if (!GlobalEventTransmitter.GroupNoticeTransmitter