mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Minor, fix insertNotifications() for unmigrated callsites. See discussion in rP3a6ee79190b709d84ff79865d1c1d6234e5c102a.
This commit is contained in:
parent
284d7b6a46
commit
4d6df7dc14
1 changed files with 25 additions and 21 deletions
|
@ -104,11 +104,15 @@ final class PhabricatorFeedStoryPublisher {
|
|||
|
||||
|
||||
private function insertNotifications($chrono_key) {
|
||||
if (!$this->primaryObjectPHID) {
|
||||
throw
|
||||
new Exception("Call setPrimaryObjectPHID() before Publishing!");
|
||||
if (!$this->subscribedPHIDs) {
|
||||
return;
|
||||
}
|
||||
if ($this->subscribedPHIDs) {
|
||||
|
||||
if (!$this->primaryObjectPHID) {
|
||||
throw new Exception(
|
||||
"You must call setPrimaryObjectPHID() if you setSubscribedPHIDs()!");
|
||||
}
|
||||
|
||||
$notif = new PhabricatorFeedStoryNotification();
|
||||
$sql = array();
|
||||
$conn = $notif->establishConnection('w');
|
||||
|
@ -132,7 +136,7 @@ final class PhabricatorFeedStoryPublisher {
|
|||
implode(', ', $sql));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* We generate a unique chronological key for each story type because we want
|
||||
* to be able to page through the stream with a cursor (i.e., select stories
|
||||
|
|
Loading…
Reference in a new issue