Compare commits

...

17 Commits
v2 ... v1.2.21

Author SHA1 Message Date
李寻欢
4c08c5caeb Merge pull request '🐛 Fix a bug.' (#63) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/63
2024-06-22 08:50:01 +08:00
李寻欢
de278f25e9 🐛 Fix a bug. 2024-06-22 08:49:28 +08:00
李寻欢
4fcf1779de Merge pull request '🎨 页面美化' (#62) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/62
2024-06-19 14:21:33 +08:00
李寻欢
f946044f13 Merge pull request '🎨 页面美化' (#61) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/61
2024-06-19 08:42:35 +08:00
李寻欢
44b8e4a162 Merge pull request '🐛 Fix a bug.' (#60) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/60
2024-06-18 17:30:27 +08:00
李寻欢
0452d951a7 Merge pull request 'hotfix' (#59) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/59
2024-06-18 17:15:09 +08:00
李寻欢
d8a8bf4efc Merge pull request '🎨 页面优化' (#58) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/58
2024-06-17 08:58:51 +08:00
李寻欢
8f6b7cb68d Merge pull request 'hotfix' (#57) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/57
2024-06-14 08:36:55 +08:00
李寻欢
72a2e694f8 Merge pull request '🎨 优化好友列表同步处理逻辑' (#56) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/56
2024-06-13 07:02:45 +08:00
李寻欢
a13e39dc0a Merge pull request '🎨 优化好友列表同步处理逻辑' (#55) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/55
2024-06-12 21:48:04 +08:00
李寻欢
74f19e9d03 Merge pull request 'hotfix' (#54) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/54
2024-06-06 14:18:58 +08:00
李寻欢
3554c95edc Merge pull request '🎨 消息总结新增传入群名称和过滤排行榜及前一天的总结消息' (#53) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/53
2024-05-31 07:27:55 +08:00
李寻欢
db8c460b42 Merge pull request '🎨 优化消息格式' (#52) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/52
2024-05-29 14:12:51 +08:00
李寻欢
7747a4b634 Merge pull request '🎨 优化消息格式' (#51) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/51
2024-05-20 08:36:12 +08:00
李寻欢
2226ec7e63 Merge pull request 'hotfix' (#50) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/50
2024-05-16 00:13:43 +08:00
李寻欢
b0be537c5d Merge pull request '🆕 新增清理不活跃成员功能' (#49) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/49
2024-05-15 17:20:12 +08:00
李寻欢
9670c0b2fe Merge pull request 'hotfix' (#48) from hotfix into main
Reviewed-on: https://gitee.ltd/lxh/go-wxhelper/pulls/48
2024-05-15 11:15:56 +08:00
2 changed files with 9 additions and 5 deletions

View File

@@ -38,7 +38,7 @@ func ClearGroupUser() {
memberMap[member.Nickname] = member.LastActive.Format("2006-01-02 15:04:05")
}
// 调用接口
utils.DeleteGroupMember(group.Wxid, strings.Join(deleteIds, ","), 0)
utils.DeleteGroupMember(group.Wxid, strings.Join(deleteIds, ","), 0, false)
// 发送通知到群里
ms := make([]string, 0)
for k, v := range memberMap {

View File

@@ -126,7 +126,9 @@ func SendEmotion(toId, emotionHash string, retryCount int) {
// @description: 删除群成员
// @param chatRoomId 群Id
// @param memberIds 成员id,用','分隔
func DeleteGroupMember(chatRoomId, memberIds string, retryCount int) {
// @param retryCount 重试次数
// @param isSure 是否确认删除
func DeleteGroupMember(chatRoomId, memberIds string, retryCount int, isSure bool) {
if retryCount > 5 {
log.Printf("重试五次失败,停止发送")
return
@@ -148,9 +150,11 @@ func DeleteGroupMember(chatRoomId, memberIds string, retryCount int) {
log.Printf("删除群成员失败: %s", err.Error())
// 休眠五秒后重新发送
time.Sleep(5 * time.Second)
DeleteGroupMember(chatRoomId, memberIds, retryCount+1)
DeleteGroupMember(chatRoomId, memberIds, retryCount+1, isSure)
}
log.Printf("删除群成员结果: %s", resp.String())
log.Printf("[%s]删除群成员结果: %s", chatRoomId, resp.String())
// 这个逼接口要调用两次,第一次调用成功,第二次调用才会真正删除
DeleteGroupMember(chatRoomId, memberIds, 5)
if !isSure {
DeleteGroupMember(chatRoomId, memberIds, 5, true)
}
}