Cleanup for bluesky support

This commit is contained in:
Dakedres 2024-04-11 13:22:12 -06:00
parent 694184d728
commit 8904e4225e

View File

@ -1,6 +1,5 @@
import Path from "path"
import { createSource, createSourceOptions, downloadImages, fetchChannel, getPostIdFromPathname, isUnset } from "../lib.js"
import { channel } from "diagnostics_channel"
class BlueskyError extends Error {}
@ -172,54 +171,3 @@ bluesky.pullImages = async (post, view, discardPostIfNoImages) => {
)
return post
}
// export const bluesky = {
// login(identifier, password) {
// },
// createSource(usertag, options, postReducerCallback) {
// let startOfServerHostname = usertag.indexOf('.')
// let user = usertag.slice(0, startOfServerHostname)
// let serverHostname = usertag.slice(startOfServerHostname + 1)
// let source = {
// type: 'bluesky',
// description: `Aggregate feed for @${user} on bluesky`,
// hostname: 'bsky.app',
// pathname: 'profile/' + usertag + "/rss",
// name: `${serverHostname}-${user}`,
// displayName: usertag,
// user,
// postsToPopulate: new Map(),
// ...createSourceOptions(options)
// }
// return createSource(source, fetchRss, postReducerCallback)
// },
// isRepost(post) {
// // Bluesky's rss does not provide retweets/retoots
// return false
// },
// async pullImages(post, view, discardPostIfNoImages) {
// let getPostsEndpoint = new URL('https://bsky.social/xrpc/app.bsky.feed.getPosts')
// getPostsEndpoint.searchParams.set('uris', [ post.guid ])
// console.log(getPostsEndpoint)
// // fetch(getPostsEndpoint)
// // post.source.postsToPopulate.set(post.guid, {
// // discardPostIfNoImages,
// // view,
// // post
// // })
// },
// populatePosts(source) {
// console.log(getPostsEndpoint)
// }
// }