#128 - add position check
This commit is contained in:
parent
092f3f0f7c
commit
37a978763c
3 changed files with 43 additions and 16 deletions
|
|
@ -20,7 +20,13 @@ return [
|
|||
$comments = $file->comments()->isEmpty() == true ? [] : Yaml::decode($file->comments()->value());
|
||||
|
||||
foreach ($comments as $existingComment) {
|
||||
if ($existingComment['author']['email'] === $user->email() && $existingComment['text'] === $data->text) {
|
||||
if
|
||||
(
|
||||
$existingComment['author']['email'] == $user->email() &&
|
||||
$existingComment['text'] == $data->text &&
|
||||
$existingComment['position']['x'] == $data->position->x &&
|
||||
$existingComment['position']['y'] == $data->position->y
|
||||
) {
|
||||
return json_encode(null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ $project = [
|
|||
'steps' => $page->getSteps(),
|
||||
'designToLight' => $page->isDTLEnabled()->isTrue() ? processDTLProposals($page) : null,
|
||||
'hasOptimizationRequest' => $page->hasOptimizationRequest()->isTrue(),
|
||||
'notifications' => $page->notifications()->yaml(),
|
||||
];
|
||||
|
||||
$pageData = array_merge($genericData, $project);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue