Closed Douglasdc3 closed 6 years ago
Have you recompiled your JavaScript recently? I just checked this, and the notifier
property is there.
Tried it again pulling in latest code. Did a artisan migrate:refresh --seed
did a yarn install && yarn dev
When I hit the api endpoint I still don't see the notifier property.
I digged into the code found that the
ThreadWasUpdated.php toArray
method does not return a notifier property
When adding I replaced the method with the snippet below it did work.
/**
* Get the array representation of the notification.
*
* @return array
*/
public function toArray()
{
return [
'message' => $this->reply->owner->name.' replied to '.$this->thread->title,
'notifier' => $this->reply->owner,
'link' => $this->reply->path()
];
}
I'll submit a PR shortly if you see another reason why this might not be working feel free to just close it.
UPDATE: @JeffreyWay The YouWereMentioned does contain this property the ThreadWasUpdated does not.
When you receive a notification the notification pop up doesn't load. this is related to the vue component trying to fetch the
notifier
property which does not exist inside thedata
property.The
/profiles/John%20Doe/notifications
response isgiving the following error
The UserNotification.vue component references this property in it's template