Skip to content
Draft
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
44 changes: 0 additions & 44 deletions .env.example

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ branches:
- l10n_2.4

before_install:
- cp .env.example .env
- cp .env .env

install:
- travis_retry composer install --no-interaction --no-suggest
Expand Down
11 changes: 6 additions & 5 deletions app/Notifications/Schedule/NewScheduleNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ public function toMail($notifiable)
{
$manageUrl = URL::signedRoute(cachet_route_generator('subscribe.manage'), ['code' => $notifiable->verify_code]);

$content = trans('notifications.schedule.new.mail.content', [
'name' => $this->schedule->name,
'date' => $this->schedule->scheduled_at_formatted,
]);


return (new MailMessage())
->subject(trans('notifications.schedule.new.mail.subject'))
->markdown('notifications.schedule.new', [
'content' => $content,
'name' => $this->schedule->name,
'dateNumber' => $this->schedule->scheduled_at_number,
'date' => $this->schedule->scheduled_at_formatted,
'message' => $this->schedule->raw_message,
'unsubscribeText' => trans('cachet.subscriber.unsubscribe'),
'unsubscribeUrl' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code),
'manageSubscriptionText' => trans('cachet.subscriber.manage_subscription'),
Expand Down Expand Up @@ -117,6 +117,7 @@ public function toSlack($notifiable)
$content = trans('notifications.schedule.new.slack.content', [
'name' => $this->schedule->name,
'date' => $this->schedule->scheduled_at_formatted,

]);

return (new SlackMessage())
Expand Down
19 changes: 18 additions & 1 deletion app/Presenters/SchedulePresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ public function formatted_message()
{
return Markdown::convertToHtml($this->wrappedObject->message);
}
/**
* Return the raw text of the message, even without Markdown.
*
* @return string
*/
public function raw_message()
{
return strip_tags($this->wrappedObject->message);
}

/**
* Present diff for humans date time.
Expand Down Expand Up @@ -106,7 +115,15 @@ public function scheduled_at()
{
return $this->dates->make($this->wrappedObject->scheduled_at)->toDateTimeString();
}

/**
* Present formatted date time.
*
* @return string
*/
public function scheduled_at_number()
{
return $this->dates->make($this->wrappedObject->scheduled_at)->format('[d/m/Y]');
}
/**
* Present diff for humans date time.
*
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"require-dev": {
"ext-sqlite3": "*",
"alt-three/testbench": "v5.0.0",
"barryvdh/laravel-debugbar": "^3.2",
"barryvdh/laravel-debugbar": "^3.4",
"filp/whoops": "^2.3",
"fzaninotto/faker": "^1.8",
"graham-campbell/analyzer": "^2.1",
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading