1
0
forked from lxh/go-wxhelper

Merge pull request '🐛 Fix a bug.' (#20) from hotfix into main

Reviewed-on: lxh/go-wxhelper#20
This commit is contained in:
李寻欢 2024-01-26 12:00:53 +08:00
commit a9f6c9ff0d

View File

@ -66,6 +66,7 @@ func Sync() {
PinyinAll: friend.PinyinAll, PinyinAll: friend.PinyinAll,
Wxid: friend.Wxid, Wxid: friend.Wxid,
IsOk: true, IsOk: true,
LastActive: time.Now().Local(),
}).Error }).Error
if err != nil { if err != nil {
log.Printf("新增好友失败: %s", err.Error()) log.Printf("新增好友失败: %s", err.Error())
@ -157,6 +158,7 @@ func syncGroupUsers(tx *gorm.DB, gid string) {
IsMember: true, IsMember: true,
IsAdmin: wxid == baseResp.Data.Admin, IsAdmin: wxid == baseResp.Data.Admin,
JoinTime: time.Now().Local(), JoinTime: time.Now().Local(),
LastActive: time.Now().Local(),
}).Error }).Error
if err != nil { if err != nil {
log.Printf("新增群成员失败: %s", err.Error()) log.Printf("新增群成员失败: %s", err.Error())