Skip to content

Commit 994d100

Browse files
bbashyfreekmurze
authored andcommitted
Use empty string for Discord defaults
Using `null` as the defaults didn't work when just entering the webhook URL. Most of the time, you will make a webhook for each notification and set name/avatar there. This is with it being `null`: ``` Spatie\Backup\Notifications\Channels\Discord\DiscordMessage::from(): Argument #1 ($username) must be of type string, null given ```
1 parent cca8b2e commit 994d100

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

config/backup.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,15 @@
191191
'discord' => [
192192
'webhook_url' => '',
193193

194-
'username' => null,
194+
/*
195+
* If this is an empty string, the name field on the webhook will be used.
196+
*/
197+
'username' => '',
195198

196-
'avatar_url' => null,
199+
/*
200+
* If this is an empty string, the avatar on the webhook will be used.
201+
*/
202+
'avatar_url' => '',
197203
],
198204
],
199205

0 commit comments

Comments
 (0)