diff --git a/app/main/model/mapmodel.php b/app/main/model/mapmodel.php index f5300c0d5..e9526d594 100644 --- a/app/main/model/mapmodel.php +++ b/app/main/model/mapmodel.php @@ -1110,7 +1110,7 @@ public function getSlackWebHookConfig(string $channel = ''): \stdClass{ $config->slackWebHookURL = $this->slackWebHookURL; $config->slackUsername = $this->slackUsername; $config->slackIcon = $this->slackIcon; - if($channel && $this->exists($channel)){ + if($channel && $this->exists($channel) && !empty($this->$channel)){ $config->slackChannel = $this->$channel; } return $config; @@ -1124,7 +1124,7 @@ public function getSlackWebHookConfig(string $channel = ''): \stdClass{ public function getDiscordWebHookConfig(string $channel = ''): \stdClass { $config = (object) []; $config->slackUsername = $this->discordUsername; - if($channel && $this->exists($channel)){ + if($channel && $this->exists($channel) && !empty($this->$channel)){ $config->slackWebHookURL = $this->$channel . '/slack'; } return $config;