Skip to content

Commit 63c851e

Browse files
authored
Merge pull request #202 from jpsilvaa/main
Support for ctwa_clid
2 parents 0c3acae + 719c7cf commit 63c851e

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/WebHook/Notification/MessageNotificationFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ private function decorateNotification(MessageNotification $notification, array $
159159
$message['referral']['body'] ?? '',
160160
$message['referral']['media_type'] ?? '',
161161
$message['referral']['image_url'] ?? $message['referral']['video_url'] ?? '',
162-
$message['referral']['thumbnail_url'] ?? ''
162+
$message['referral']['thumbnail_url'] ?? '',
163+
$message['referral']['ctwa_clid'] ?? ''
163164
));
164165
}
165166

src/WebHook/Notification/Support/Referral.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ final class Referral
2020

2121
private string $thumbnail_url;
2222

23+
private string $ctwa_clid;
24+
2325
public function __construct(
2426
string $source_id,
2527
string $source_url,
@@ -28,7 +30,8 @@ public function __construct(
2830
string $body,
2931
string $media_type,
3032
string $media_url,
31-
string $thumbnail_url
33+
string $thumbnail_url,
34+
string $ctwa_clid
3235
) {
3336
$this->source_id = $source_id;
3437
$this->source_url = $source_url;
@@ -38,6 +41,7 @@ public function __construct(
3841
$this->media_type = $media_type;
3942
$this->media_url = $media_url;
4043
$this->thumbnail_url = $thumbnail_url;
44+
$this->ctwa_clid = $ctwa_clid;
4145
}
4246

4347
public function sourceId(): string
@@ -79,4 +83,9 @@ public function thumbnailUrl(): string
7983
{
8084
return $this->thumbnail_url;
8185
}
86+
87+
public function ctwaClid(): string
88+
{
89+
return $this->ctwa_clid;
90+
}
8291
}

0 commit comments

Comments
 (0)