- fixed some cURL errors for not existing discord map configuration

This commit is contained in:
Mark Friedrich
2018-01-01 22:12:47 +01:00
parent ae833030e4
commit 8c10645ba5

View File

@@ -1110,7 +1110,7 @@ class MapModel extends AbstractMapTrackingModel {
$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 @@ class MapModel extends AbstractMapTrackingModel {
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;