Fill parent id

This commit is contained in:
Inal Arsanukaev 2022-08-23 19:23:23 +03:00
parent 500f734626
commit ac3f1fc6c8
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ public class WebhookMessageBuilder {
.setWebhookId(webhookMessageModel.getHookId())
.setSourceId(sourceId)
.setEventId(event.getEventID())
.setParentEventId(-1) //TODO REMOVE
.setParentEventId(parentId)
.setCreatedAt(TypeUtil.temporalToString(Instant.now()))
.setUrl(webhookMessageModel.getUrl())
.setContentType(ContentType.APPLICATION_JSON.getMimeType())

View File

@ -50,7 +50,7 @@ public class WebhookMessageBuilderTest {
long parentId = 1L;
WebhookMessage webhookMessage = builder.build(webhookMessageModel, event, sourceId, parentId);
assertEquals(sourceId, webhookMessage.getSourceId());
//assertEquals(parentId, webhookMessage.getParentEventId());
assertEquals(parentId, webhookMessage.getParentEventId());
assertEquals(webhookMessageModel.getHookId(), webhookMessage.getWebhookId());
assertEquals(event.getEventID().longValue(), webhookMessage.getEventId());
assertNotNull(webhookMessage.getAdditionalHeaders().get("Content-Signature"));