Make 'Edit threshhold' notif appear regardless of title existence

If a user recieves 'this is your X edit' they should get this notif
regardless of whether the edit they created was deleted. We should
make sure the title is there only for deciding whether or not to
create a link for it; otherwise, the notification will just appear
without a link to the revision.

Change-Id: I00ed4278bb4e15b1e9ddfa2c3af8fad0540fc5f8
This commit is contained in:
Moriel Schottlender 2016-09-08 15:14:26 -07:00 committed by Mattflaschen
parent 6d0583a772
commit 59c0ad6c4d

View file

@ -11,13 +11,12 @@ class EchoEditThresholdPresentationModel extends EchoEventPresentationModel {
}
public function getPrimaryLink() {
if ( !$this->event->getTitle() ) {
return false;
}
return array(
'url' => $this->event->getTitle()->getLocalURL(),
'label' => $this->msg( 'notification-link-thank-you-edit', $this->getViewingUserForGender() )->text()
);
}
public function canRender() {
return $this->event->getTitle() !== null;
}
}