Skip to content

Commit

Permalink
Merge pull request #1 from gigitux/feature/add-link
Browse files Browse the repository at this point in the history
Show original link at the bottom of the email
  • Loading branch information
gigitux authored Mar 9, 2024
2 parents 4539679 + cfda0a5 commit ea45dcb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
7 changes: 6 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ if (import.meta.main) {

const { content, title } = article.article.article;

await sendEmail({ content, title });
const contentWithLink = `${content}\n\n
<a name="primo" href="${article.article.article.url}">Check the article.</a>
`;

await sendEmail({ content: contentWithLink, title });

await archiveArticle({
linkId: article.article.article.id,
Expand Down
9 changes: 0 additions & 9 deletions main_bench.ts

This file was deleted.

2 changes: 2 additions & 0 deletions omnivore-client/get_article.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ type Response = {
image: string;
content: string;
slug: string;
url: string;
originalArticleUrl: string;
};
};
};
Expand Down
1 change: 1 addition & 0 deletions omnivore-client/get_articles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ query Search($after: String, $first: Int, $query: String) {
export const getArticles = (client: GraphQLClient) => (): Promise<Response> => {
return client.request(query, {
first: 50,
query: "in:inbox",
});
};

0 comments on commit ea45dcb

Please sign in to comment.