forked from bluesky-social/atproto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include own replies to own post roots via new filter `posts_and_autho…
…r_threads` (bluesky-social#1776) * Include own replies to own post roots in post_no_replies * Updates * Simplify * snaps * snaps * Remove unused import * Add new threads filter to getAuthorFeed * Implement new filter * Typo
- Loading branch information
1 parent
8f84207
commit ffe39aa
Showing
14 changed files
with
156 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@atproto/bsky': patch | ||
--- | ||
|
||
Integrate `posts_and_author_threads` filter into `getAuthorFeed` implementation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@atproto/bsky': patch | ||
'@atproto/api': patch | ||
'@atproto/pds': patch | ||
--- | ||
|
||
Add `posts_and_author_threads` filter to `getAuthorFeed` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
import { SeedClient } from '@atproto/dev-env' | ||
import basicSeed from './basic' | ||
|
||
export default async (sc: SeedClient) => { | ||
await basicSeed(sc) | ||
await sc.createAccount('eve', { | ||
email: '[email protected]', | ||
handle: 'eve.test', | ||
password: 'eve-pass', | ||
}) | ||
await sc.createAccount('fred', { | ||
email: '[email protected]', | ||
handle: 'fred.test', | ||
password: 'fred-pass', | ||
}) | ||
|
||
const alice = sc.dids.alice | ||
const eve = sc.dids.eve | ||
const fred = sc.dids.fred | ||
|
||
/* | ||
* Self thread | ||
*/ | ||
await sc.post(eve, evePosts[0]) | ||
await sc.reply( | ||
eve, | ||
sc.posts[eve][0].ref, | ||
sc.posts[eve][0].ref, | ||
eveOwnThreadReplies[0], | ||
) | ||
await sc.reply( | ||
eve, | ||
sc.posts[eve][0].ref, | ||
sc.replies[eve][0].ref, | ||
eveOwnThreadReplies[1], | ||
) | ||
await sc.reply( | ||
eve, | ||
sc.posts[eve][0].ref, | ||
sc.replies[eve][1].ref, | ||
eveOwnThreadReplies[2], | ||
) | ||
|
||
/** | ||
* Two replies to Alice | ||
*/ | ||
await sc.reply( | ||
eve, | ||
sc.posts[alice][1].ref, | ||
sc.posts[alice][1].ref, | ||
eveAliceReplies[0], | ||
) | ||
await sc.reply( | ||
eve, | ||
sc.posts[alice][1].ref, | ||
sc.replies[eve][3].ref, | ||
eveAliceReplies[1], | ||
) | ||
|
||
/** | ||
* Two replies to Fred, who replied to Eve's root post. This creates a | ||
* "detached" thread, where one Fred post breaks the continuity. | ||
*/ | ||
await sc.post(eve, evePosts[1]) | ||
await sc.reply( | ||
fred, | ||
sc.posts[eve][1].ref, | ||
sc.posts[eve][1].ref, | ||
fredReplies[0], | ||
) | ||
await sc.reply( | ||
eve, | ||
sc.posts[eve][1].ref, | ||
sc.replies[fred][0].ref, | ||
eveFredReplies[0], | ||
) | ||
await sc.reply( | ||
eve, | ||
sc.posts[eve][1].ref, | ||
sc.replies[eve][4].ref, | ||
eveFredReplies[1], | ||
) | ||
|
||
return sc | ||
} | ||
|
||
const evePosts = ['eve own thread', 'eve detached thread'] | ||
const eveOwnThreadReplies = [ | ||
'eve own reply 1', | ||
'eve own reply 2', | ||
'eve own reply 3', | ||
] | ||
const eveAliceReplies = ['eve reply to alice 1', 'eve reply to alice 2'] | ||
const eveFredReplies = ['eve reply to fred 1', 'eve reply to fred 2'] | ||
const fredReplies = ['fred reply to eve 1'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters