-
Notifications
You must be signed in to change notification settings - Fork 554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Appview blocks #1187
Appview blocks #1187
Conversation
async processAll(timeout?: number) { | ||
await this.pds.ctx.backgroundQueue.processAll() | ||
if (!this.bsky) return | ||
await this.processFullSubscription(timeout) | ||
await this.bsky.ctx.backgroundQueue.processAll() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yupyup, been wanting to do exactly this 💪
function truncateUtf8(str: string | null | undefined, length: number) { | ||
if (!str) return str | ||
const encoder = new TextEncoder() | ||
const utf8 = encoder.encode(str) | ||
if (utf8.length > length) { | ||
const decoder = new TextDecoder('utf-8', { fatal: false }) | ||
const truncated = utf8.slice(0, length) | ||
return decoder.decode(truncated).replace(/\uFFFD$/, '') | ||
} | ||
return str | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can get rid of this now that all clients are compatible with the lex refactor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah cool cool checks out 👍
i couldn't quite remember when we'd added this in & erred on the side of caution
@@ -54,6 +56,7 @@ export class IndexingService { | |||
profile: Profile.makePlugin(this.db, backgroundQueue), | |||
list: List.makePlugin(this.db, backgroundQueue), | |||
listItem: ListItem.makePlugin(this.db, backgroundQueue), | |||
block: Block.makePlugin(this.db, backgroundQueue), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove records from the actor_block
table during unindexActor()
too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yup totally. good call 👍
).toBeFalsy() | ||
}) | ||
|
||
// it('strips blocked users out of getPopular', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this remain commented out intentionally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea removed that method from the appview - i'll just remove this test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a few minor thoughts, but this is looking great 🙏
* Model post and profile aggs in bsky * Add background, onCommit, db and background stats * Add aggregations for post and profile * Use background queue in bsky labeler, misc plumbing * Process background throughout bsky tests * bsky tidy and fixes * Build views using agg tables in bsky * Views of feedgens on bsky * hook up indexing * Setup custom feeds on bsky * graph service + getList routes * migration * Feed views refactor for bsky, implement getFeed w/ auth passthrough * mute lists * add getListMutes * mute list tests * add mutes table & mute/unmuteActor routes * Passthrough auth from bsky appview to feedgen, fixes/tidy/tests * add getMutes * implement mute functionality * remove unspecced * mute tests * mute impl tests * remove proxy tests * Test custom algos on bsky * add mute state to snapshots * table & indexing plugin * getBlocks * bail out of mute subquery when no viewer * fleshing out services * Test pds getFeed proxy * tidy, fix build * tidy * Fix minor race in bsky mutelist tests * blocks in feed views * db migration, impl block logic & tests * Update pds proxy snaps based on appview mutes * missed some files on last commit * ensure process after unmute * update snap * move adminAuth to seedclient param * apply blocks in getFeed * update snaps * upadate one last snap * pr feedback --------- Co-authored-by: Devin Ivy <devinivy@gmail.com>
* Model post and profile aggs in bsky * Add background, onCommit, db and background stats * Add aggregations for post and profile * Use background queue in bsky labeler, misc plumbing * Process background throughout bsky tests * bsky tidy and fixes * Build views using agg tables in bsky * Views of feedgens on bsky * hook up indexing * Setup custom feeds on bsky * graph service + getList routes * migration * Feed views refactor for bsky, implement getFeed w/ auth passthrough * mute lists * add getListMutes * mute list tests * add mutes table & mute/unmuteActor routes * Passthrough auth from bsky appview to feedgen, fixes/tidy/tests * add getMutes * implement mute functionality * remove unspecced * mute tests * mute impl tests * remove proxy tests * Test custom algos on bsky * add mute state to snapshots * table & indexing plugin * getBlocks * bail out of mute subquery when no viewer * fleshing out services * Test pds getFeed proxy * tidy, fix build * tidy * Fix minor race in bsky mutelist tests * blocks in feed views * db migration, impl block logic & tests * Update pds proxy snaps based on appview mutes * missed some files on last commit * ensure process after unmute * update snap * move adminAuth to seedclient param * apply blocks in getFeed * update snaps * upadate one last snap * pr feedback --------- Co-authored-by: Devin Ivy <devinivy@gmail.com>
Implements blocks on the appview