Skip to content

Commit

Permalink
Fix getSubjectStatuses SQL (bluesky-social#3426)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Sieben authored Jan 21, 2025
1 parent 74ee108 commit 1ada2d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/heavy-badgers-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@atproto/ozone": patch
---

Fix getSubjectStatuses query
4 changes: 2 additions & 2 deletions packages/ozone/src/mod-service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,8 @@ export class ModerationService {
) {
builder = builder.where(
queueSeed
? sql`ABS(HASHTEXT(${queueSeed} || did)) % ${queueCount}`
: sql`ABS(HASHTEXT(did)) % ${queueCount}`,
? sql`ABS(HASHTEXT(${queueSeed} || moderation_subject_status.did)) % ${queueCount}`
: sql`ABS(HASHTEXT(moderation_subject_status.did)) % ${queueCount}`,
'=',
queueIndex,
)
Expand Down

0 comments on commit 1ada2d0

Please sign in to comment.