Los hilos funcionan ahora como en Mastodon. Refactorización de código

This commit is contained in:
Jesús Pavón Abián
2026-02-01 13:07:16 +01:00
parent 9bb1522eca
commit 3e239f05c8
3 changed files with 34 additions and 3 deletions

View File

@@ -359,6 +359,19 @@ class UserTimeline(BaseBuffer):
return 0
try:
if isinstance(actor, str) and not actor.startswith("did:"):
try:
profile = self.session.get_profile(actor)
if profile:
def g(obj, key, default=None):
if isinstance(obj, dict):
return obj.get(key, default)
return getattr(obj, key, default)
did = g(profile, "did")
if did:
actor = did
except Exception:
pass
res = api.app.bsky.feed.get_author_feed({
"actor": actor,
"limit": count,