Skip to content

Commit

Permalink
Support for ctwa_clid
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsilvaa committed Jul 19, 2024
1 parent 955728a commit 157e13c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/WebHook/Notification/MessageNotificationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ private function decorateNotification(MessageNotification $notification, array $
$message['referral']['body'] ?? '',
$message['referral']['media_type'] ?? '',
$message['referral']['image_url'] ?? $message['referral']['video_url'] ?? '',
$message['referral']['thumbnail_url'] ?? ''
$message['referral']['thumbnail_url'] ?? '',
$message['referral']['ctwa_clid'] ?? ''
));
}

Expand Down
11 changes: 10 additions & 1 deletion src/WebHook/Notification/Support/Referral.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ final class Referral

private string $thumbnail_url;

private string $ctwa_clid;

public function __construct(
string $source_id,
string $source_url,
Expand All @@ -28,7 +30,8 @@ public function __construct(
string $body,
string $media_type,
string $media_url,
string $thumbnail_url
string $thumbnail_url,
string $ctwa_clid
) {
$this->source_id = $source_id;
$this->source_url = $source_url;
Expand All @@ -38,6 +41,7 @@ public function __construct(
$this->media_type = $media_type;
$this->media_url = $media_url;
$this->thumbnail_url = $thumbnail_url;
$this->ctwa_clid = $ctwa_clid;
}

public function sourceId(): string
Expand Down Expand Up @@ -79,4 +83,9 @@ public function thumbnailUrl(): string
{
return $this->thumbnail_url;
}

public function ctwaClid(): string
{
return $this->ctwa_clid;
}
}

0 comments on commit 157e13c

Please sign in to comment.