This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package ru.soune.nocopy.service.file.impl;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import com.vrt.NoCopyFileService;
|
||||
import com.vrt.fileprotection.FileProtector;
|
||||
import com.vrt.fileprotection.NoCopyCheckResult;
|
||||
@@ -447,7 +449,16 @@ public class FileUploadServiceImpl implements FileUploadService {
|
||||
|
||||
tariffInfoService.writeOffTokens(session.getUserId(), costService.protectFileCost(fileType),
|
||||
OperationType.FILE_UPLOAD);
|
||||
notificationService.addNotification(NotificationType.FILE_ADDED_TO_SYSTEM, session.getUserId());
|
||||
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
ObjectNode context = mapper.createObjectNode();
|
||||
context.put("status", status.name());
|
||||
context.put("file_name", fileEntity.getOriginalFileName());
|
||||
context.put("file_id", fileEntity.getId());
|
||||
context.put("support_id", fileEntity.getSupportId());
|
||||
|
||||
notificationService.addNotification(NotificationType.FILE_ADDED_TO_SYSTEM, session.getUserId(),
|
||||
context);
|
||||
}
|
||||
|
||||
if (status != FileStatus.TEMP) {
|
||||
|
||||
Reference in New Issue
Block a user