Fix parent id (#13)

Co-authored-by: Inal Arsanukaev <inalarsanukaev@192.168.1.4>
This commit is contained in:
Inal Arsanukaev 2022-03-15 20:12:03 +03:00 committed by GitHub
parent aa94a879bb
commit f4a7eac666
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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(parentId)
.setParentEventId(-1) //TODO REMOVE
.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"));