mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix(news): one-hour World News API retention, refunded reads, pins, disputed areas, counts
Keep World News API results an hour at most and say caching needs its permission; refund a read that never reached it; match Local by any pin; assign a disputed area by a point inside it; untitled GDELT stories are minor; hotspot counts leave out minor reports. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
1 parent
49ac289d00
commit
7cd2af46e4
12 files changed
+230
-53
No files matched your search
@@ -423,14 +423,17 @@ export function eventReports(events, { titleOf = () => null } = {}) {
|
||||
// The article's words decide whether it is conflict, as any headline's
|
||||
// would: GDELT codes an election story as "fighting" too. GDELT's code
|
||||
// names the kind only where the words read as conflict without naming
|
||||
// one, or there are no words.
|
||||
// one. A story with no words at all has GDELT's code alone to go by,
|
||||
// which is not enough to list it under Conflicts: it is minor (kept
|
||||
// for Local) until a page title comes in.
|
||||
const read = own ? categorizeText({ title: own }) : null;
|
||||
const tags = read?.tags || [];
|
||||
const relevance = read
|
||||
? relevanceOf({ category: read.category, tags, title: own })
|
||||
: 'related';
|
||||
const category =
|
||||
read && read.category !== 'other'
|
||||
: 'minor';
|
||||
const category = !read
|
||||
? eventCategory
|
||||
: read.category !== 'other'
|
||||
? read.category
|
||||
: relevance === 'minor'
|
||||
? 'other'
|
||||
|
||||
Reference in new issue
Block a user