From cfda0a52a83863f46883088f12810c60e04074d7 Mon Sep 17 00:00:00 2001 From: Luigi Teschio Date: Sat, 9 Mar 2024 12:11:11 +0100 Subject: [PATCH] show original link at the bottom of the email --- main.ts | 7 ++++++- main_bench.ts | 9 --------- omnivore-client/get_article.ts | 2 ++ omnivore-client/get_articles.ts | 1 + 4 files changed, 9 insertions(+), 10 deletions(-) delete mode 100644 main_bench.ts diff --git a/main.ts b/main.ts index 3606141..c928ea1 100644 --- a/main.ts +++ b/main.ts @@ -21,7 +21,12 @@ if (import.meta.main) { const { content, title } = article.article.article; - await sendEmail({ content, title }); + const contentWithLink = `${content}\n\n + + Check the article. + `; + + await sendEmail({ content: contentWithLink, title }); await archiveArticle({ linkId: article.article.article.id, diff --git a/main_bench.ts b/main_bench.ts deleted file mode 100644 index 5867ca0..0000000 --- a/main_bench.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { add } from "./main.ts"; - -Deno.bench(function addSmall() { - add(1, 2); -}); - -Deno.bench(function addBig() { - add(2 ** 32, 2 ** 32); -}); diff --git a/omnivore-client/get_article.ts b/omnivore-client/get_article.ts index 7429fb8..71db02b 100644 --- a/omnivore-client/get_article.ts +++ b/omnivore-client/get_article.ts @@ -9,6 +9,8 @@ type Response = { image: string; content: string; slug: string; + url: string; + originalArticleUrl: string; }; }; }; diff --git a/omnivore-client/get_articles.ts b/omnivore-client/get_articles.ts index caff4e2..0bbcafd 100644 --- a/omnivore-client/get_articles.ts +++ b/omnivore-client/get_articles.ts @@ -36,5 +36,6 @@ query Search($after: String, $first: Int, $query: String) { export const getArticles = (client: GraphQLClient) => (): Promise => { return client.request(query, { first: 50, + query: "in:inbox", }); };