Skip to main content

Stories

Building the story carousel

Finding stories of the users the logged-in user follows

The "Following" story carousel is built using Fetching & Paginating most recent data from each of the previously picked "best" relay for each followed user, in parallel, with 1 filters JSON:

{"kinds":[1,6],"#l":["story"],"authors":["pubkey1","pubkey2"]}
note

The authors field is the previously determined list of followed users for each specific relay that is queried

note

The client must persist a read receipt for each entry(story) the user reads, on disk, which is later used to differentiate, when displaying, between read and unread stories

Displaying Stories

All the returned events from each relay are merged together and ordered by the read status (unread first), then by created_at desc

Each event is then displayed using the common approach.