Shorten some code
This commit is contained in:
parent
f34c65111b
commit
2cfb84eece
@ -194,16 +194,13 @@ public class ReportManager
|
||||
}).thenCompose(reportIdOptional -> reportIdOptional.isPresent() ? _reportRepository.getReport(reportIdOptional.get()) : CompletableFuture.completedFuture(null))
|
||||
.join();
|
||||
|
||||
if (report != null)
|
||||
{
|
||||
report.addReportReason(new ReportMessage(reporterId, reason, _serverName, _serverWeight));
|
||||
}
|
||||
else
|
||||
if (report == null)
|
||||
{
|
||||
report = new Report(suspectId, category);
|
||||
report.addReportReason(new ReportMessage(reporterId, reason, _serverName, _serverWeight));
|
||||
}
|
||||
|
||||
report.addReportReason(new ReportMessage(reporterId, reason, _serverName, _serverWeight));
|
||||
|
||||
// todo store token for chat site
|
||||
_reportRepository.updateReport(report)
|
||||
.exceptionally(throwable -> {
|
||||
|
Loading…
Reference in New Issue
Block a user