filter promoted tweets the sequel

This commit is contained in:
Cynthia Foxwell 2025-11-12 19:05:38 -07:00
parent 26853a83ca
commit 0e74c1e9bd
No known key found for this signature in database

View File

@ -538,7 +538,7 @@ proc parseGraphThread(js: JsonNode): tuple[thread: Chain; self: bool] =
let cursor = t{"item", "content", "value"}
result.thread.cursor = cursor.getStr
result.thread.hasMore = true
elif "tweet" in entryId:
elif "tweet" in entryId and "promoted-" notin entryId:
let
isLegacy = t{"item"}.hasKey("itemContent")
(contentKey, resultKey) = if isLegacy: ("itemContent", "tweet_results")