Bluesky posts have titles now
This commit is contained in:
parent
b9463ad58f
commit
13b3e59d0e
@ -132,7 +132,7 @@ bluesky.createSource = (handle, options = {}, client, postReducerCallback, cache
|
||||
return createSource(
|
||||
source,
|
||||
isUnset(client) ? fetchChannel : bluesky.fetchAnnotatedChannelFor(client),
|
||||
postReducerCallback,
|
||||
bluesky.processPostAfterCallback(postReducerCallback),
|
||||
cache
|
||||
)
|
||||
}
|
||||
@ -144,6 +144,13 @@ bluesky.fetchAnnotatedChannelFor = (client) => async (source) => {
|
||||
return channel
|
||||
}
|
||||
|
||||
bluesky.processPostAfterCallback = (postReducerCallback) => async (post) => {
|
||||
post.title = post.item.querySelector('description')?.textContent
|
||||
post = await postReducerCallback(post)
|
||||
|
||||
return post
|
||||
}
|
||||
|
||||
bluesky.isRepost = (post) => {
|
||||
let annotation = post.source.postAnnotations.get(post.guid)
|
||||
let beenChecked = post.source.postsChecked.has(post.guid)
|
||||
|
Loading…
x
Reference in New Issue
Block a user