fix: read following state from current X user schema

This commit is contained in:
Darío Sevilla committed 2026-10-15 08:15:38 +00:00
1 parent 5a492b0cc3
commit c31dfa14db
3 files changed
+14 -4

No files matched your search

+2 -2
View File
@@ -17,9 +17,9 @@
seen.add(value);
const legacy = value.legacy && typeof value.legacy === "object" ? value.legacy : value;
const screenName = legacy.screen_name || value.screen_name || value.username;
const screenName = legacy.screen_name || value.screen_name || value.core?.screen_name || value.username;
if (screenName && String(screenName).toLowerCase() === username.toLowerCase()) {
const following = legacy.following ?? value.following;
const following = legacy.following ?? value.following ?? value.relationship_perspectives?.following;
const location = legacy.location || value.location;
return {
following: typeof following === "boolean" ? following : null,