Filter by hashtags and urls again
This commit is contained in:
parent
d2f2214d65
commit
c939b611a9
@ -199,6 +199,11 @@ export async function getPosts(since: string | null, limit: number) {
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
if (rows.length === 0) {
|
||||
// No need to check for tags
|
||||
resolve([]);
|
||||
return;
|
||||
}
|
||||
const postIdsParams = rows.map(() => '?').join(', ');
|
||||
db.all(
|
||||
`SELECT post_id, tags.url, tags.tag
|
||||
|
@ -30,7 +30,7 @@ export class TimelineReader {
|
||||
const found_urls = urls.filter(t => post.content.includes(t));
|
||||
|
||||
if (found_urls.length === 0 && found_tags.length === 0) {
|
||||
//return;
|
||||
return;
|
||||
}
|
||||
|
||||
const youtubeMatches = found_urls.map(u => u.match(YOUTUBE_REGEX)).filter(i => i !== null);
|
||||
|
Loading…
Reference in New Issue
Block a user