- added "Discord" WebHook support, closed #547

This commit is contained in:
Mark Friedrich
2017-12-20 17:36:58 +01:00
parent 2cc12f0b61
commit 17bc619425
20 changed files with 383 additions and 54 deletions

View File

@@ -565,6 +565,7 @@ class SystemModel extends AbstractMapTrackingModel {
/**
* send rally point poke to various "APIs"
* -> send to a Slack channel
* -> send to a Discord channel
* -> send to an Email
* @param array $rallyData
* @param CharacterModel $characterModel
@@ -585,6 +586,17 @@ class SystemModel extends AbstractMapTrackingModel {
$log->addHandler('slackRally', null, $this->getMap()->getSlackWebHookConfig($slackChannelKey));
}
// Discord poke ---------------------------------------------------------------------------
$discordChannelKey = 'discordWebHookURLRally';
if(
$rallyData['pokeDiscord'] === true &&
$this->getMap()->isDiscordChannelEnabled($discordChannelKey)
){
$isValidLog = true;
$log->addHandler('discordRally', null, $this->getMap()->getDiscordWebHookConfig($discordChannelKey));
}
// Mail poke ------------------------------------------------------------------------------
$mailAddressKey = 'RALLY_SET';
if(