mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Fix PhabricatorBot ignore messages from senders
Summary: PhabricatorBotMessage->getSender returns a PhabricatorBotUser object (which potentially can be null) So check null and then use getName to get actual name of the sender Test Plan: Run phabot and add myself to ignore list Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5036
This commit is contained in:
parent
28bdeb6d3e
commit
204d6481e4
1 changed files with 5 additions and 2 deletions
|
@ -107,9 +107,12 @@ final class PhabricatorBot extends PhabricatorDaemon {
|
|||
|
||||
private function routeMessage(PhabricatorBotMessage $message) {
|
||||
$ignore = $this->getConfig('ignore');
|
||||
if ($ignore && in_array($message->getSender(), $ignore)) {
|
||||
if ($ignore) {
|
||||
$sender = $message->getSender();
|
||||
if ($sender && in_array($sender->getName(), $ignore)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->handlers as $handler) {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue