diff --git a/feed.go b/feed.go index 4ef37a0..d5e0f3c 100644 --- a/feed.go +++ b/feed.go @@ -607,15 +607,14 @@ func chunk(args []any, qry func(int) (string, int), maxArgs int) iter.Seq2[strin func refreshLastTwt(ctx context.Context, db db) error { qry := ` delete from last_twt_on; - insert into last_twt_on + insert into last_twt_on (feed_id, last_twt_on) select distinct feed_id, max(strftime('%Y-%m-%dT%H:%M:%fZ', (substring(text, 1, instr(text, ' ')-1)))) last_twt_on from twts - group by feed_id - on conflict(feed_id); + group by feed_id; delete from twt_mentions; - insert into twt_mentions + insert into twt_mentions (ulid, feed_id) select distinct ulid, unhex(replace(trim(value,'{}'),'-','')) feed_id