Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update doc to remove call to setParsedSubject #1461

Merged
merged 1 commit into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions docs/notification-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class Notifier implements \OCP\Notification\INotifier {
}

/**
* Human readable name describing the notifier
* Human-readable name describing the notifier
* @return string
*/
public function getName(): string {
Expand Down Expand Up @@ -154,9 +154,15 @@ class Notifier implements \OCP\Notification\INotifier {
}
}

// This is a little helper function which automatically sets the simple parsed subject
// based on the rich subject you set.
protected function setParsedSubjectFromRichSubject(INotification $notification) {
/**
* This is a little helper function which automatically sets the simple parsed subject
* based on the rich subject you set. This is also the default behaviour of the API
* since Nextcloud 26, but in case you would like to return simpler or other strings,
* this function allows you to take over.
*
* @param INotification $notification
*/
protected function setParsedSubjectFromRichSubject(INotification $notification): void {
$placeholders = $replacements = [];
foreach ($notification->getRichSubjectParameters() as $placeholder => $parameter) {
$placeholders[] = '{' . $placeholder . '}';
Expand Down
2 changes: 1 addition & 1 deletion docs/ocs-endpoint-v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ In order to check whether a set of notification ids (max. 200 items per request)
a client can send a POST request against `/ocs/v2.php/apps/notifications/api/v2/notifications/exists` with
the integer list provided as `ids` field on the POST body.

**Note:** This endpoint was added for Nextcloud 27, so check for the `exists` capability first.
**Note:** This endpoint was added for Nextcloud 27 and 26.0.1, so check for the `exists` capability first.