Skip to content

Commit

Permalink
fix: 增强重构自动退群逻辑的判定机制
Browse files Browse the repository at this point in the history
  • Loading branch information
PaienNate committed Oct 29, 2024
1 parent d976c02 commit 79853e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dice/im_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,8 @@ func (s *IMSession) LongTimeQuitInactiveGroupReborn(threshold time.Time, groupsP
}
// 如果在上述所有操作后,发现时间仍然是0,那么必须忽略该值,因为可能是还没初始化的群,不能人家刚进来就走
// 注意不能用last.Equal(time.Time{}),因为这里是时间戳的1970-01-01,而Go初始时间是0000-01-01.
if last.Unix() == 0 {
// 预防性代码:如果last是0000-01-01,那也不应该被退群。
if last.Unix() <= 0 {
return true
}
// 如果时间比要退群的时间早
Expand Down

0 comments on commit 79853e1

Please sign in to comment.