Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add thumb_url to Slack Attachment #19200

Merged
merged 1 commit into from
May 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ protected function attachments(SlackMessage $message)
'footer' => $attachment->footer,
'footer_icon' => $attachment->footerIcon,
'image_url' => $attachment->imageUrl,
'thumb_url' => $attachment->thumbUrl,
'mrkdwn_in' => $attachment->markdown,
'text' => $attachment->content,
'title' => $attachment->title,
Expand Down
20 changes: 20 additions & 0 deletions src/Illuminate/Notifications/Messages/SlackAttachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ class SlackAttachment
*/
public $markdown;

/**
* The attachment's thumb url.
*
* @var string
*/
public $thumbUrl;

/**
* The attachment's image url.
*
Expand Down Expand Up @@ -200,6 +207,19 @@ public function image($url)
return $this;
}

/**
* Set the thumb URL.
*
* @param string $url
* @return $this
*/
public function thumb($url)
{
$this->thumbUrl = $url;

return $this;
}

/**
* Set the footer content.
*
Expand Down