3

I want to apply mark_seen and mark_read for a specific activity of getstream.io, but the counter is still the same. Here is my code:

const notification = client.feed('NOTIFICATION', '1');
notification.get({ mark_seen: ['1111111-f22d-333-33-0000001f'] }); //getstream activity id

Update:

Here is my get stream response:

{
    "results": [
        {
            "activities": [
                {
                    "actor": "user:1",
                    "foreign_id": "POST:50",
                    "id": "00000000-0000-11e0-8000-800001be0000",
                    "object": "POST:50",
                    "origin": null,
                    "target": "USER:1",
                    "time": "2018-01-12T14:08:03.000000",
                    "verb": "CREATE"
                }
            ],
            "activity_count": 1,
            "actor_count": 1,
            "created_at": "2018-01-12T14:08:12.324882",
            "group": "user:1_POST:50",
            "id": "111111bb-f1a1-11e1-1111-111111111b11.user:1_POST:50",
            "is_read": false,
            "is_seen": false,
            "updated_at": "2018-01-12T14:08:12.324882",
            "verb": "CREATE"
        }
    ],
    "next": "",
    "duration": "25.85ms",
    "unseen": 3,
    "unread": 3
}

I am using activity.id to mark my activity as read, but its not working. However it works (and decrements the counter) when I use id (the group id).

  • 1
    To clarify, are you referring to the counter in the response to the Feed.get() call? This would be intended behaviour. The counter should be decremented in subsequent calls to the API. It will help if you can share the sequence of API calls and the responses returned at each point (strip any sensitive data). – Dwight Gunning Jan 12 '18 at 09:46
  • 2
    @DwightGunning please check my above question –  Jan 12 '18 at 14:35
  • The `mark_seen` array contains an ID (`1111111-f22d-333-33-0000001f`) that doesn't appear at all in the response. Are you sure that it's an ID of an activity in the feed? – Dwight Gunning Jan 12 '18 at 14:40
  • i changed the ids which is not actual rest of the data is same –  Jan 12 '18 at 14:42
  • @DwightGunning I just checked, the `id` provided in the data (grouped id) works fine and marks `read` as well as `seen`. I wasn't using `group id` instead using single `activity id`. –  Jan 12 '18 at 14:50
  • 1
    Great. Best to describe the solution in an Answer and mark it accepted. – Dwight Gunning Jan 12 '18 at 14:52

0 Answers0