Disable caching reuploaded encrypted files

This commit is contained in:
Tulir Asokan
2023-01-30 01:01:10 +02:00
parent e7615ef4be
commit e183f5cffa

View File

@@ -140,7 +140,10 @@ func (br *DiscordBridge) uploadMatrixAttachment(intent *appservice.IntentAPI, da
}
dbFile.MXC = uploaded.ContentURI
}
dbFile.Insert(nil)
// TODO add option to cache encrypted files too?
if !dbFile.Encrypted {
dbFile.Insert(nil)
}
return dbFile, nil
}