Shamrock: 为请求事件增加user_uid #150

This commit is contained in:
whitechi73 2024-01-23 00:36:44 +08:00
parent 9c9fbfa753
commit ec132d224e
3 changed files with 8 additions and 5 deletions

View File

@ -481,7 +481,8 @@ internal object GlobalEventTransmitter: BaseSvc() {
suspend fun transGroupApply( suspend fun transGroupApply(
time: Long, time: Long,
operator: Long, applier: Long,
applierUid: String,
reason: String, reason: String,
groupCode: Long, groupCode: Long,
flag: String, flag: String,
@ -492,7 +493,8 @@ internal object GlobalEventTransmitter: BaseSvc() {
selfId = app.longAccountUin, selfId = app.longAccountUin,
postType = PostType.Request, postType = PostType.Request,
type = RequestType.Group, type = RequestType.Group,
userId = operator, userId = applier,
userUid = applierUid,
comment = reason, comment = reason,
groupId = groupCode, groupId = groupCode,
subType = subType, subType = subType,

View File

@ -112,6 +112,7 @@ internal data class RequestEvent(
@SerialName("sub_type") val subType: RequestSubType = RequestSubType.None, @SerialName("sub_type") val subType: RequestSubType = RequestSubType.None,
@SerialName("group_id") val groupId: Long = -1, @SerialName("group_id") val groupId: Long = -1,
@SerialName("user_id") val userId: Long = -1, @SerialName("user_id") val userId: Long = -1,
@SerialName("user_uid") val userUid: String = "",
@SerialName("comment") val comment: String = "", @SerialName("comment") val comment: String = "",
@SerialName("flag") val flag: String? = null, @SerialName("flag") val flag: String? = null,
) )

View File

@ -560,7 +560,7 @@ internal object PrimitiveListener {
"$time;$groupCode;$applier" "$time;$groupCode;$applier"
} }
if (!GlobalEventTransmitter.RequestTransmitter if (!GlobalEventTransmitter.RequestTransmitter
.transGroupApply(time, applier, reason, groupCode, flag, RequestSubType.Add) .transGroupApply(time, applier, applierUid, reason, groupCode, flag, RequestSubType.Add)
) { ) {
LogCenter.log("入群申请推送失败!", Level.WARN) LogCenter.log("入群申请推送失败!", Level.WARN)
} }
@ -591,7 +591,7 @@ internal object PrimitiveListener {
"$time;$groupCode;$applier" "$time;$groupCode;$applier"
} }
if (!GlobalEventTransmitter.RequestTransmitter if (!GlobalEventTransmitter.RequestTransmitter
.transGroupApply(time, applier, "", groupCode, flag, RequestSubType.Add) .transGroupApply(time, applier, applierUid, "", groupCode, flag, RequestSubType.Add)
) { ) {
LogCenter.log("邀请入群申请推送失败!", Level.WARN) LogCenter.log("邀请入群申请推送失败!", Level.WARN)
} }
@ -618,7 +618,7 @@ internal object PrimitiveListener {
"$time;$groupCode;$uin" "$time;$groupCode;$uin"
} }
if (!GlobalEventTransmitter.RequestTransmitter if (!GlobalEventTransmitter.RequestTransmitter
.transGroupApply(time, invitor, "", groupCode, flag, RequestSubType.Invite) .transGroupApply(time, invitor, invitorUid, "", groupCode, flag, RequestSubType.Invite)
) { ) {
LogCenter.log("邀请入群推送失败!", Level.WARN) LogCenter.log("邀请入群推送失败!", Level.WARN)
} }