diff --git a/docs/create.md b/docs/create.md index 8a2c04722..f09081666 100644 --- a/docs/create.md +++ b/docs/create.md @@ -8,22 +8,22 @@ To create and publish an event to the activity app, a new `IEvent` should be fet // When you have a plain file without a class, you can use // \OC::$server->getActivityManager() instead. -$event = $this->activityManager->createEvent(); +$event = $this->activityManager->generateEvent(); ... -$this->activityManager->->publish($event); +$this->activityManager->publish($event); ``` The following values **must** be set before publishing an event: * `setApp()` -* `setType()` - this must match an `ISetting::getIdentifier()` +* `setType()` - this must match an `\OCP\Activity\ISetting::getIdentifier()` * `setAffectedUser()` -* `setAuthor()` -* `setTimestamp()` * `setSubject()` * `setObject()` Additionally these values **can** be set: +* `setAuthor()` - if no author is set, the current user will be used +* `setTimestamp()` - if no time is set, the current time will be used * `setMessage()` * `setLink()` - should be done in `IProvider::parse()` * `setIcon()` - should be done in `IProvider::parse()`