Differential D15316 Diff 36948 src/infrastructure/daemon/bot/handler/PhabricatorBotObjectNameHandler.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/bot/handler/PhabricatorBotObjectNameHandler.php
Show First 20 Lines • Show All 167 Lines • ▼ Show 20 Lines | switch ($original_message->getCommand()) { | ||||
$output[$commit['phid']] = $commit['uri']; | $output[$commit['phid']] = $commit['uri']; | ||||
} | } | ||||
} | } | ||||
foreach ($output as $phid => $description) { | foreach ($output as $phid => $description) { | ||||
// Don't mention the same object more than once every 10 minutes | // Don't mention the same object more than once every 10 minutes | ||||
// in public channels, so we avoid spamming the chat over and over | // in public channels, so we avoid spamming the chat over and over | ||||
// again for discsussions of a specific revision, for example. | // again for discussions of a specific revision, for example. | ||||
$target_name = $original_message->getTarget()->getName(); | $target_name = $original_message->getTarget()->getName(); | ||||
if (empty($this->recentlyMentioned[$target_name])) { | if (empty($this->recentlyMentioned[$target_name])) { | ||||
$this->recentlyMentioned[$target_name] = array(); | $this->recentlyMentioned[$target_name] = array(); | ||||
} | } | ||||
$quiet_until = idx( | $quiet_until = idx( | ||||
$this->recentlyMentioned[$target_name], | $this->recentlyMentioned[$target_name], | ||||
Show All 16 Lines |