I noticed that when I get activities from a notification feed using mark_read=[<id>]
the response seems incorrect: response.unread
shows the correct counter (that is, it has decreased by 1), but the object for <id>
in response.results
has is_read=false
.
Is this a bug or expected behaviour? and if this is expected, what's the best way to handle this on my side so I don't display it as being unread?
This is expected behavior. When reading a feed with mark_read or mark_seen, the APIs return the seen/read of activities before they get updated by the request.
This is mainly to support the common case of retrieving a feed and marking all activities as seen (but still be able to tell which ones are seen for the first time). In your case, since you are marking activities as seen by providing the ID, you should be able to update the UI accordingly.