question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Notifications in NotificationFeed not rendering

See original GitHub issue

Trying to render out the NotificationFeed on my frontend. It is making the call to the stream api to get activities, however it’s not rendering any of them.

On backend I am using the stream-php library adding activities that look like so:

$userFeed = $client->feed('notification', '10');
$activity_data = ['actor' => '11', 'verb' => 'follow', 'object' => '10'];
$activity_response = $userFeed->addActivity($activity_data);

10 and 11 being the user_id’s of properly initialized users

Response given from the NotificationFeed component fetching /enrich/feed/notification/10/

{
    "results": [ {
            "actor": "11",
            "foreign_id": "",
            "id": "50657f6a-eeda-11ea-a8df-128a130028af",
            "object": "10",
            "origin": null,
            "own_reactions": {},
            "reaction_counts": {},
            "target": "",
            "time": "2020-09-04T18:13:20.733169",
            "verb": "follow"
        }],
        "activity_count": 1,
        "actor_count": 2,
        "created_at": "2020-09-04T17:54:57.297259",
        "group": "follow_2020-09-04",
        "id": "d0d640f7-eeda-11ea-8080-80001d8dc8c7.follow_2020-09-04",
        "is_read": false,
        "is_seen": false,
        "updated_at": "2020-09-04T18:16:56.220491",
        "verb": "follow"
    }],
    "next": "",
    "duration": "20.18ms",
    "unseen": 1,
    "unread": 1
}

I get the notify alert when a new activity is added, but none of the Notification components are being rendered

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mtkoponecommented, Jan 7, 2021

I’m also running into this. Can you provide some detail on where the problem is, so maybe i could bypass it locally somehow?

1reaction
jaapbakker88commented, Sep 7, 2020

@justin-snap I think the way you’re adding activities is wrong, because it’s a reference to an object we need to enrich you’ll need to specify the collection as well. In this case the User collection.

so this would be something like this:

$userFeed = $client->feed('notification', '10');
$activity_data = ['actor' => '11', 'verb' => 'follow', 'object' => $client->users->createReference('10')];
$activity_response = $userFeed->addActivity($activity_data); 
Read more comments on GitHub >

github_iconTop Results From Across the Web

Notification feed following Flat feed isn't showing activities
I have a notification feed like NOTIFICATIONS:userID and I have a flat feed GLOBAL:domain . The notification feed is set up to follow...
Read more >
Problem: Not seeing Notifications for new posts - Feeder Help
Step 1. Ensure your notification settings are on · Step 2. Check that the feed is updating correctly · Step 3. Ensure that...
Read more >
Notifications Not Shown - Mobile Push
Common reasons why Mobile Push notifications are not showing on your device. ... "Delivered" notifications in OneSignal means we have successfully sent the ......
Read more >
Notifications are not showing under Notification t... - ServiceNow
Notifications are not showing under Notification tab? how to configure to show my notification in this tab?
Read more >
8 Ways to Fix Instagram Notifications Not Working
Notification issues may stem from not having the most up-to-date version of Instagram. In addition to bug fixes, updates may also include new ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found