Commit Graph

148 Commits

Author SHA1 Message Date
d17d097b12 Fix parts of CI (#304)
* Run cargo fmt, hide clippy::cmp_owned errors

* Bump deps

* Fix failing test

* Update src/client.rs

---------

Co-authored-by: Matthew Esposito <matt@matthew.science>
2024-10-31 22:50:50 -04:00
49ef59e000 chore: make library 2024-10-21 20:46:03 -04:00
1838fdaea4 Replace askama with rinja (#276) 2024-10-02 17:43:13 -04:00
69c7a69afd add description for rss item (just like https://news.ycombinator.com/… (#220)
fix #201
2024-09-21 00:05:32 -04:00
27b56c1781 fix(client): handle new gated and quarantined error types (#187)
* fix(client): handle new gated and quarantined error types

* test(client): add test for gated and quarantined
2024-07-21 14:22:54 -04:00
374238abc3 Add RSS feeds (fix #57) (#90)
* Add RSS feeds

* feat(rss): feature-ify rss

* feat(rss): config-ify rss

* fix(rss): update info page

* feat(rss): conditionally add RSS feeds to user and sub pages

* feat(rss): implement URLs for RSS
2024-07-21 14:09:34 -04:00
67a890cab3 fix(posts): fix sort call on new (#171) 2024-07-02 08:04:27 -04:00
ea87ec33a1 fix(subreddit): handle plus-encoding errors even better (#163)
* fix(subreddit): handle plus-encoding errors even better

* chore(clippy): fix lint
2024-06-28 22:28:58 -04:00
951fe400ae fix(subreddit): handle plus-encoding errors 2024-06-25 19:50:00 -04:00
565b50646f added geo_filter query param to /r/popular endpoint 2024-04-25 14:01:06 +03:00
9f9ae45f6e Add many Clippy's, fix many Clippy's 2024-01-19 20:16:17 -05:00
6d97f4c8dd Change Tokio tests - fix GHA runner (again) 2023-12-30 21:33:27 -05:00
d327ab2c95 Small changes to params generation in subreddit.rs 2023-12-30 17:10:46 -05:00
d86b77ab56 Reset test threads to 1 (should fix test issues in GHA) 2023-12-29 20:33:43 -05:00
45d8f1bbc8 Better handle redirects with new OAuth endpoints 2023-12-29 19:28:41 -05:00
9f41af6eee Improve spoofing - match headers more closely, pull in real versions/builds 2023-12-28 15:37:02 -05:00
b43ed01958 Fix /r/popular localization - set geo filter to global 2023-12-28 10:30:42 -05:00
3e3c30d7f1 Update cookie + changes 2023-12-26 16:24:53 -05:00
90d1831352 Merge remote-tracking branch 'origin/pull/819' 2023-12-26 15:48:27 -05:00
fc4b686607 Merge remote-tracking branch 'origin/pull/746' 2023-12-26 15:18:49 -05:00
49dde7ad72 Improve subreddit test 2023-06-08 14:06:58 -04:00
0ca0eefaa4 Add tests to check fetching sub/user/oauth 2023-06-06 15:28:36 -04:00
a0726c5903 Change the bypass message and format code
The bypass message now indicates that the bypass is only temporary.
2023-03-23 11:09:33 -07:00
e046144bf3 Allow bypassing nsfw gate for posts
On instances that are not sfw-only, the nsfw gate for posts can now be
bypassed.
2023-03-22 23:18:35 -07:00
741613e27f Ignore errors while fetching subreddit names in subscriptions_filters()
If we can't retrieve subreddit name, just use the user-supplied name.
This fixes banned subreddits being impossible to to unfilter or
unsubscribe from.
A drawback of such approach is that it might be possible to subscribe to
a subreddit twice with different casing, however the chance of this is
extremely low.
2023-03-09 15:18:03 +03:00
eb07a2ce7c Make gated subreddits accessible by treating them as quarantined (#722)
* Fix gated communities being unviewable by treating them as quarantined

* Show restriction reason in quarantine template

* Add `gated` checks for other requests
2023-02-26 00:40:32 -07:00
9a7b3b29f5 Merge remote-tracking branch 'origin/master' into hide_awards 2023-01-03 11:12:27 -07:00
c83a4e0cc8 Landing page for NSFW content, SFW-only mode (#656)
Co-authored-by: Matt <matt@matthew.science>
Co-authored-by: Spike <19519553+spikecodes@users.noreply.github.com>
2023-01-03 02:39:45 -07:00
6a785baa2c Add hide_awards config 2023-01-01 21:39:38 -05:00
ab30b8bbec Bugfix: 'all posts are hidden because NSFW' when no posts where found (#666)
* Fix 'all_posts_hidden_nsfw' when there are no posts.

If a search query yielded no results and the user set nsfw posts to be
hidden, libreddit would show 'All posts are hidden because they are NSFW.
Enable "Show NSFW posts" in settings to view'. This is fixed by
verifying tnat posts.len > 0 before setting 'all_posts_hidden_nsfw' to
true.

* Add a message when no posts were found.

* Delete 2
2022-12-31 19:11:59 -07:00
e579b97442 List post duplicates (resolves #574). 2022-12-03 01:08:36 -07:00
465d9b7ba7 Implement 'posts hidden because of NSFW'. (Resolves #159) (#619) 2022-11-07 20:54:49 -07:00
322aa97a18 Fix HTML encoding in templating (#404) 2022-05-21 05:28:31 +00:00
428dc58e3c Update to v0.22.8 2022-05-20 19:20:44 -07:00
bb7fb1313d Fix multireddit subscription redirect url 2022-05-15 13:50:17 -07:00
eb6c5e5e1e Fix backslash url rewriting and add tests for rewrite_urls. (#461)
* Fix backslash url rewriting.

Add test for rewrite_urls.

Fixes #281.

* Update to v0.22.5

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2022-03-26 20:26:30 +00:00
f0a6bdc21b Fix sorting buttons on r/all and r/popular (#402)
* Fix sorting buttons on r/all and r/popular

* Bump version to v0.22.2

* Fix empty sidebar in r/all and r/popular

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2022-03-15 03:39:39 +00:00
70ff150ab4 Add user listing buttons (#400)
* Add user listing buttons

* Update to v0.22

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2022-03-13 19:06:27 +00:00
977cd0763a Fix #379 2022-01-05 16:46:45 -08:00
7aeabfc4bc Rewrite Reddit post links to Libreddit equivalents 2021-12-26 21:18:20 -08:00
888e7b302d Filter subreddits and users (#317)
* Initial work on filtering subreddits and users

* Fix doubly-prefixed subreddit name in search alt text (e.g. r/r/pics)

* Don't set post title to "Comment" if empty - this could throw off actual posts with the title "Comment"

* Filter search results

* Fix filtering to differentiate between "this subject itself is filtered" vs "all posts on this current page have been filtered"

* Remove unnecessary check

* Clean up

* Cargo format

* Collapse comments from filtered users

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-11-26 04:02:04 +00:00
34ea679519 Update crates and optimize parameters 2021-11-14 18:51:36 -08:00
0f7ba3c61d Add "open in reddit" button to all pages (#304)
* Pass the url parameter to all templates. Add a reddit_link to the navbar, which opens the current url on reddit.

* Add icon for reddit link

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-11-15 02:39:33 +00:00
6a4191f3b5 Fix #272 2021-09-09 17:28:55 -07:00
d2002c9027 Disable dysfunctional moderator list feature 2021-06-11 11:03:36 -07:00
4defb58f2a Optimizations and commenting 2021-05-20 12:24:06 -07:00
ba42fc066f Fix two subscription bugs 2021-05-19 20:30:10 -07:00
43ed9756dc Upgrade to v0.14 2021-05-16 09:11:38 -07:00
8bb247af3b Added support for quarantined subreddits (#219)
* Added support for quarantined subreddits

* Added confirmation wall for quarantined subreddits

* Added quarantine walls to other routes and fixed case issue

* Correct obsolete use of cookie()

* Refactor param() and quarantine()

Co-authored-by: Spike <19519553+spikecodes@users.noreply.github.com>
2021-05-16 15:53:39 +00:00
4f09333cd7 Handle three unwraps 2021-05-15 14:51:57 -07:00