do not write X-Alts for confidential files

dbus-notify
Zlatin Balevsky 2022-05-04 11:06:35 +01:00
parent a60fbb7011
commit 9e5af81aba
No known key found for this signature in database
GPG Key ID: A72832072D525E41
1 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,9 @@ abstract class MeshUploader extends Uploader {
String xHave = DataUtil.encodeXHave(mesh.pieces.getDownloaded(), mesh.pieces.nPieces) String xHave = DataUtil.encodeXHave(mesh.pieces.getDownloaded(), mesh.pieces.nPieces)
endpoint.getOutputStream().write("X-Have: $xHave\r\n".getBytes(StandardCharsets.US_ASCII)) endpoint.getOutputStream().write("X-Have: $xHave\r\n".getBytes(StandardCharsets.US_ASCII))
if (confidential)
return
Set<Persona> sources = mesh.getRandom(9, toExclude) Set<Persona> sources = mesh.getRandom(9, toExclude)
if (!sources.isEmpty()) { if (!sources.isEmpty()) {
String xAlts = sources.stream().map({ it.toBase64() }).collect(Collectors.joining(",")) String xAlts = sources.stream().map({ it.toBase64() }).collect(Collectors.joining(","))