[bluesky] fix feeds and lists

bug introduced in 495c9ee1
This commit is contained in:
Mike Fährmann
2024-03-03 20:22:34 +01:00
parent f3bc048ff7
commit 1115dccd0d

View File

@@ -321,7 +321,7 @@ class BlueskyAPI():
endpoint = "app.bsky.feed.getFeed"
params = {
"feed" : "at://{}/app.bsky.feed.generator/{}".format(
self._did_from_actor(actor), feed),
self._did_from_actor(actor, False), feed),
"limit": "100",
}
return self._pagination(endpoint, params)
@@ -338,7 +338,7 @@ class BlueskyAPI():
endpoint = "app.bsky.feed.getListFeed"
params = {
"list" : "at://{}/app.bsky.graph.list/{}".format(
self._did_from_actor(actor), list),
self._did_from_actor(actor, False), list),
"limit": "100",
}
return self._pagination(endpoint, params)
@@ -385,14 +385,14 @@ class BlueskyAPI():
}
return self._pagination(endpoint, params, "posts")
def _did_from_actor(self, actor):
def _did_from_actor(self, actor, user_did=True):
if actor.startswith("did:"):
did = actor
else:
did = self.resolve_handle(actor)
extr = self.extractor
if not extr.config("reposts", False):
if user_did and not extr.config("reposts", False):
extr._user_did = did
if extr._metadata_user:
extr._user = self.get_profile(did)