pull/255/head
skiffer-git 3 years ago
parent af1d8fa834
commit a01156feb6

@ -32,13 +32,14 @@ func InsertIntoGroup(groupInfo db.Group) error {
groupInfo.GroupName = "Group Chat"
}
groupInfo.CreateTime = time.Now()
if groupInfo.NotificationUpdateTime.Unix() < 0 {
groupInfo.NotificationUpdateTime = utils.UnixSecondToTime(0)
}
err = dbConn.Table("groups").Create(groupInfo).Error
if err != nil {
return err
}
if groupInfo.NotificationUpdateTime.Unix() < 0 {
groupInfo.NotificationUpdateTime = time.Now()
}
return nil
}

Loading…
Cancel
Save