mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Add some slack notifications and a todo to fix the rest
This commit is contained in:
@@ -87,21 +87,10 @@ class VersionCheckResult extends Notification
|
||||
*/
|
||||
public function toSlack($notifiable)
|
||||
{
|
||||
// return (new SlackMessage())->text($this->message)
|
||||
// ->sectionBlock(function (SectionBlock $block) {
|
||||
// $button = new ButtonElement('Button');
|
||||
// $button->url('https://github.com/firefly-iii/firefly-iii/releases');
|
||||
// $block->accessory($button);
|
||||
// });
|
||||
//// ->attachment(function ($attachment) {
|
||||
//// $attachment->title('Firefly III @ GitHub', 'https://github.com/firefly-iii/firefly-iii/releases');
|
||||
//// });
|
||||
|
||||
|
||||
return (new SlackMessage())->content($this->message)
|
||||
->attachment(function ($attachment) {
|
||||
$attachment->title('Firefly III @ GitHub', 'https://github.com/firefly-iii/firefly-iii/releases');
|
||||
});
|
||||
->attachment(function ($attachment) {
|
||||
$attachment->title('Firefly III @ GitHub', 'https://github.com/firefly-iii/firefly-iii/releases');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,7 +103,7 @@ class VersionCheckResult extends Notification
|
||||
public function via($notifiable)
|
||||
{
|
||||
/** @var User|null $user */
|
||||
$user = auth()->user();
|
||||
$user = auth()->user();
|
||||
$slackUrl = null === $user ? '' : (string)app('preferences')->getForUser(auth()->user(), 'slack_webhook_url', '')->data;
|
||||
if (str_starts_with($slackUrl, 'https://hooks.slack.com/services/')) {
|
||||
return ['mail', 'slack'];
|
||||
|
Reference in New Issue
Block a user