[FIX](Забытый коммит) Не указывался requestUUID в UpdateResponse

This commit is contained in:
Gravit 2019-11-28 23:15:28 +07:00
parent aa4d4881c8
commit fccc9fe8c0
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -28,14 +28,14 @@ public void execute(ChannelHandlerContext ctx, Client client) {
for (ClientProfile p : server.getProfiles()) { for (ClientProfile p : server.getProfiles()) {
if (!client.profile.getTitle().equals(p.getTitle())) continue; if (!client.profile.getTitle().equals(p.getTitle())) continue;
if (!p.isWhitelistContains(client.username)) { if (!p.isWhitelistContains(client.username)) {
service.sendObject(ctx, new ErrorRequestEvent("You don't download this folder")); sendError("You don't download this folder");
return; return;
} }
} }
} }
HashedDir dir = server.updatesDirMap.get(dirName); HashedDir dir = server.updatesDirMap.get(dirName);
if (dir == null) { if (dir == null) {
service.sendObject(ctx, new ErrorRequestEvent(String.format("Directory %s not found", dirName))); sendError(String.format("Directory %s not found", dirName));
return; return;
} }
String url = server.config.netty.downloadURL.replace("%dirname%", IOHelper.urlEncode(dirName)); String url = server.config.netty.downloadURL.replace("%dirname%", IOHelper.urlEncode(dirName));
@ -45,6 +45,6 @@ public void execute(ChannelHandlerContext ctx, Client client) {
url = bind.url; url = bind.url;
zip = bind.zip; zip = bind.zip;
} }
service.sendObject(ctx, new UpdateRequestEvent(dir, url, zip)); sendResult(new UpdateRequestEvent(dir, url, zip));
} }
} }