Commit Graph

139 Commits

Author SHA1 Message Date
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
e4f9bd7b8d Configure default settings using environment variables 2021-05-15 13:59:42 -07:00
928907086c HLS video playback (#182)
* HLS video playback

Signed-off-by: Adrian Lebioda <adrianlebioda@gmail.com>

* Add LibreJS compliance

* Locally host hls.js

* Notification about HLS under videos that support it

Signed-off-by: Adrian Lebioda <adrianlebioda@gmail.com>

* Use .contains() instead of .find() == None

* Make list of preferences constant

* Change headers_keys from Vector into Array

* Fix incorrect detecting of # in paths

* Remove trailing-slash-appending if statement

* Change HLS notification styling

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-05-10 01:25:52 +00:00
536a766960 WIP: Various subreddit & post fixes (#215)
* Fixed random subreddit issue

* Fixed large subreddit icon rendering

* Formatting fix

* Fix dodgy HTML rendering issues

* Revert "Fix dodgy HTML rendering issues"

This reverts commit 58be5f449b72f271d2b3c046870b652d1e715289.
2021-05-09 15:40:49 +00:00
c1560f4eba Upgrade to v0.11.0 2021-05-06 12:31:59 -07:00
242ffab0da Fix bug with subreddit subscription case & RTL languages (#214)
* Fixed subreddit subscription case issues

* Fixed formatting

* Fixed flair RTL language issue (#132)

* Convert display_lookup to Vec

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-05-06 19:11:25 +00:00
1211d781d0 Add list of moderators to sidebar (#213)
* Added list of moderators to sidebar & added wiki not found message

* Improved code formatting
2021-05-04 17:30:54 +00:00
b3e4b7bfae Add user following functionality 2021-04-06 10:23:05 -07:00
66ac72beab Fix clippy errors 2021-03-26 20:00:47 -07:00
6a7f725c12 Default subreddit post sorting. Closes #166 2021-03-25 21:41:58 -07:00