[bluesky] filter reposts only for user timelines (#5528)

This commit is contained in:
Mike Fährmann
2024-05-01 15:41:21 +02:00
parent 3cf5366143
commit 6db1837a6d

View File

@@ -317,7 +317,7 @@ class BlueskyAPI():
def get_author_feed(self, actor, filter="posts_and_author_threads"):
endpoint = "app.bsky.feed.getAuthorFeed"
params = {
"actor" : self._did_from_actor(actor),
"actor" : self._did_from_actor(actor, True),
"filter": filter,
"limit" : "100",
}
@@ -327,7 +327,7 @@ class BlueskyAPI():
endpoint = "app.bsky.feed.getFeed"
params = {
"feed" : "at://{}/app.bsky.feed.generator/{}".format(
self._did_from_actor(actor, False), feed),
self._did_from_actor(actor), feed),
"limit": "100",
}
return self._pagination(endpoint, params)
@@ -344,7 +344,7 @@ class BlueskyAPI():
endpoint = "app.bsky.feed.getListFeed"
params = {
"list" : "at://{}/app.bsky.graph.list/{}".format(
self._did_from_actor(actor, False), list),
self._did_from_actor(actor), list),
"limit": "100",
}
return self._pagination(endpoint, params)
@@ -391,7 +391,7 @@ class BlueskyAPI():
}
return self._pagination(endpoint, params, "posts")
def _did_from_actor(self, actor, user_did=True):
def _did_from_actor(self, actor, user_did=False):
if actor.startswith("did:"):
did = actor
else: