Don't even try to combine when the subject is different

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2016-11-08 14:09:41 +01:00
parent c2a5c1f2c6
commit 27c08167df
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 5 additions and 0 deletions

View File

@ -59,6 +59,11 @@ class Provider implements IProvider {
$parsedParameters = $this->getParsedParameters($event->getSubject(), $event->getSubjectParameters());
$richParameters = $this->getRichParameters($event->getSubject(), $event->getSubjectParameters());
if ($previousEvent instanceof IEvent && $event->getSubject() !== $previousEvent->getSubject()) {
// Different subject means not the same string, so no grouping
$previousEvent = null;
}
if ($event->getSubject() === 'created_self') {
$event->setParsedSubject($this->l->t('You created %1$s', $parsedParameters))
->setRichSubject($this->l->t('You created {file1}'), $richParameters)