Procházet zdrojové kódy

Disable caching reuploaded encrypted files

Tulir Asokan před 2 roky
rodič
revize
e183f5cffa
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      attachments.go

+ 4 - 1
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
 }