Skip to content

Commit

Permalink
Channel::fetchChannelTypes(): Remove explicit check for email and roc…
Browse files Browse the repository at this point in the history
…ketchat

Uppercase the first char of type should be sufficient
  • Loading branch information
sukhwinder33445 committed Oct 25, 2023
1 parent 0b7cf1a commit 370f7fd
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions library/Notifications/Model/Channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,7 @@ public static function fetchChannelTypes(Connection $conn): array
{
$channels = [];
foreach (Channel::on($conn) as $channel) {
switch ($channel->type) {
case 'rocketchat':
$name = 'Rocket.Chat';
break;
case 'email':
$name = t('E-Mail');
break;
default:
$name = $channel->type;
}

$channels[$channel->id] = $name;
$channels[$channel->id] = ucfirst($channel->type);
}

return $channels;
Expand Down

0 comments on commit 370f7fd

Please sign in to comment.