bluesky-social / atproto

Social networking technology created by Bluesky
Other
6.88k stars 486 forks source link

getAuthorFeed with posts_and_author_threads filter incorrect behaviour with threads saved with same createdAt #3027

Open fogrye opened 4 days ago

fogrye commented 4 days ago

Describe the bug

Bsky client inserts threads using com.atproto.repo.applyWrites programatically computing cid and rkey. If thread is created at same time it works just fine because of only 1 call.

As third party service dev I rely on com.atproto.repo.createRecord to get correct uri and cid. Still I use same createdAt as time of bigger post from other service.

Thread is successfully created but available only with posts_with_replies filter for method app.bsky.feed.getAuthorFeed.

To Reproduce

Steps to reproduce the behavior:

  1. exec
    
    const agent = new AtpAgent({
    service: 'https://bsky.social',
    });
    // authorise

const date = new Date(); const {uri, cid} = await agent.post({ text: 'hello', createdAt: date.toISOString() }) await agent.post({ text: 'world', reply: {root: {uri, cid}, parent: {uri, cid}}, createdAt: date.toISOString() })


2. check in client app that thread missing in tab "Posts", only visible in "Replies"

**Expected behavior**

Thread should be visible in "Posts"