Implement posting threads (#6049)

* Implement posting a thread

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>

* Fix native build

* Remove dependency on web crypto API

* Fix unrelated TS error (wtf)

---------

Co-authored-by: Mary <148872143+mary-ext@users.noreply.github.com>
This commit is contained in:
dan
2024-11-01 03:42:38 +00:00
committed by GitHub
parent 4c31403330
commit 01c9ac0e13
6 changed files with 243 additions and 71 deletions
+6 -2
View File
@@ -128,7 +128,9 @@ async function loggedOutFetch({
headers: {'Accept-Language': contentLangs, ...labelersHeader},
},
)
let data = res.ok ? jsonStringToLex(await res.text()) : null
let data = res.ok
? (jsonStringToLex(await res.text()) as GetCustomFeed.OutputSchema)
: null
if (data?.feed?.length) {
return {
success: true,
@@ -143,7 +145,9 @@ async function loggedOutFetch({
}&limit=${limit}`,
{method: 'GET', headers: {'Accept-Language': '', ...labelersHeader}},
)
data = res.ok ? jsonStringToLex(await res.text()) : null
data = res.ok
? (jsonStringToLex(await res.text()) as GetCustomFeed.OutputSchema)
: null
if (data?.feed?.length) {
return {
success: true,