Fallback to current user when triggering activities

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-07-09 22:26:51 +02:00
parent 8380ae69c8
commit d7d5365a67

View File

@@ -240,6 +240,9 @@ class ActivityManager {
}
public function triggerEvent($objectType, $entity, $subject, $additionalParams = [], $author = null) {
if ($author === null) {
$author = $this->userId;
}
try {
$event = $this->createEvent($objectType, $entity, $subject, $additionalParams, $author);
if ($event !== null) {