Skip to content
Open
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
4 changes: 2 additions & 2 deletions services/MessagingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ public function processNotification(BaseNotification $baseNotification, User $us
);
}

public function processMessage(User $user, string $title, string $body, ?string $url, ?string $imageUrl, ?int $notificationCount)
public function processMessage(User $user, ?string $title, ?string $body, ?string $url, ?string $imageUrl, ?int $notificationCount)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yurabakhtin Is it really a good idea to allow notifications without any text?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luke- I don't know why the error exists at all because the params cannot be null:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yurabakhtin That's really strange. Maybe html_entity_decode returns null? In any case, I would not recommend the current PR but rather look for the cause.

{
foreach ($this->drivers as $driver) {
$tokens = (new TokenService())->getTokensForUser($user, $driver);
if (empty($tokens)) {
continue;
}

$driver->processCloudMessage($tokens, $title, $body, $url, $imageUrl, $notificationCount);
$driver->processCloudMessage($tokens, (string) $title, (string) $body, $url, $imageUrl, $notificationCount);
}
}

Expand Down