Merge pull request #574 from exodus4d/develop

- fixed some cURL errors for not existing discord map configuration
This commit is contained in:
Mark Friedrich
2018-01-01 22:19:50 +01:00
committed by GitHub

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;