Skip to content

Commit

Permalink
client: update ShutUpTimestamp when receive mute event
Browse files Browse the repository at this point in the history
  • Loading branch information
wdvxdr1123 committed Mar 18, 2022
1 parent bc4e9f3 commit 87e53dd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions client/online_push.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ func decodeOnlinePushReqPacket(c *QQClient, info *network.IncomingPacketInfo, pa
r.ReadBytes(6)
target := int64(uint32(r.ReadInt32()))
t := r.ReadInt32()

if target != 0 {
member := c.FindGroup(groupCode).FindMember(target)
if t > 0 {
member.ShutUpTimestamp = time.Now().Add(time.Second * time.Duration(t)).Unix()
} else {
member.ShutUpTimestamp = 0
}
}

c.GroupMuteEvent.dispatch(c, &GroupMuteEvent{
GroupCode: groupCode,
OperatorUin: operator,
Expand Down

0 comments on commit 87e53dd

Please sign in to comment.