Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: failed to search items by rss feed url which has query parameters #4312

Merged
merged 4 commits into from
Aug 27, 2024

Conversation

sywhb
Copy link
Contributor

@sywhb sywhb commented Aug 23, 2024

  • encode uri component of the rss feed url
  • use descriminated unions to differetiate rss and newsletter subscription

Copy link

vercel bot commented Aug 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
omnivore-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 1:28am
omnivore-prod ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 27, 2024 1:28am

if (useFolders) {
const param = `folder_${parameters.length}`
const folderSql = escapeQueryWithParameters(
`library_item.folder = :${param}`,
{ [param]: value }
)
sql = `(${sql} AND ${folderSql})`
return `(library_item.archived_at IS NULL AND ${folderSql})`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you want these changes in this PR too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I will move these backend changes to a separate PR

* encode uri component of the rss feed url
* use descriminated unions to differetiate rss and newsletter subscription
This reverts commit b2cf7d2.
@@ -266,7 +271,11 @@ export default function Rss(): JSX.Element {
</VStack>
}
onClick={() => {
router.push(`/home?q=in:inbox rss:"${subscription.url}"`)
router.push(
`/home?q=in:inbox rss:"${encodeURIComponent(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this should be search?q=

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jacksonh
Copy link
Contributor

Just one small change as we don't use home for queries anymore.

@sywhb sywhb merged commit 1a2dbf6 into main Aug 27, 2024
4 of 6 checks passed
@sywhb sywhb deleted the fix/search-by-rss-feed-url branch August 27, 2024 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants