diff --git a/attachments.go b/attachments.go index a47cba8..51255ab 100644 --- a/attachments.go +++ b/attachments.go @@ -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 }