Skip to content

Commit

Permalink
Adds support for special use case where the notification target is a …
Browse files Browse the repository at this point in the history
…user

It is now possible to add new notifications like this:

notify_user($recipient_guid, $sender_guid, $subject, $body, [
    'action' => 'somea_action',
    'object' => $user, // <-- This parameter can now be ElggUser object
]);
  • Loading branch information
juho-jaakkola committed Aug 22, 2017
1 parent 0a75393 commit ccb069e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions start.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ function notifier_notification_send($hook, $type, $result, $params) {
// that it will get automatically mapped to the
// 'notifier/messages/create/relationship/friend' view.
$description = 'create:relationship:friend';
} else {
$entity = $object;
}

break;
Expand Down

0 comments on commit ccb069e

Please sign in to comment.