fix: update user and file deletion to use unscoped delete; add user synchronization logic

This commit is contained in:
krau
2025-02-19 14:19:39 +08:00
parent ab822c2fe6
commit f73f18e90d
5 changed files with 70 additions and 47 deletions
+1 -1
View File
@@ -20,5 +20,5 @@ func GetReceivedFileByChatAndMessageID(chatID int64, messageID int) (*types.Rece
}
func DeleteReceivedFile(receivedFile *types.ReceivedFile) error {
return db.Delete(receivedFile).Error
return db.Unscoped().Delete(receivedFile).Error
}