Skip to content

Commit

Permalink
Made $username parameter nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
mho22 authored Jul 11, 2024
1 parent d859659 commit fb95e76
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Notifications/Channels/Discord/DiscordMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ class DiscordMessage

protected string $url = '';

public function from(string $username, string $avatarUrl = null): self
public function from(string $username = null, string $avatarUrl = null): self
{
$this->username = $username;
if (! is_null($username)) {
$this->username = $username;
}

if (! is_null($avatarUrl)) {
$this->avatarUrl = $avatarUrl;
Expand Down

0 comments on commit fb95e76

Please sign in to comment.