Optimistic hidden replies (#4977)

This commit is contained in:
Eric Bailey
2024-08-23 14:35:48 -05:00
committed by GitHub
parent 5ec8761b29
commit 425dd5f27f
9 changed files with 70 additions and 129 deletions
-20
View File
@@ -139,23 +139,3 @@ export function createThreadgateRecord(
hiddenReplies: threadgate.hiddenReplies || [],
}
}
export function createTempThreadgateView({
postUri,
hiddenReplies,
}: Pick<AppBskyFeedThreadgate.Record, 'hiddenReplies'> & {
postUri: string
}): AppBskyFeedDefs.ThreadgateView {
const record: AppBskyFeedThreadgate.Record = {
$type: 'app.bsky.feed.threadgate',
post: postUri,
allow: undefined,
hiddenReplies,
createdAt: new Date().toISOString(),
}
return {
$type: 'app.bsky.feed.defs#threadgateView',
uri: postUri,
record,
}
}