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

Add ability to disable all user notifications #3473

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

unixfox
Copy link
Member

@unixfox unixfox commented Dec 7, 2022

This PR adds the ability to disable all the user notifications in order to combat against the ever-growing disk space generated by refreshing the user notifications.

See #2042 (comment) for more info.


About the PR I have not disabled everything when the parameter is set to false, mainly in the file https://github.com/iv-org/invidious/blob/master/src/invidious/users.cr#L133 because I fear to break something. Feel free to improve my code about that if needed.

But the basic idea is implemented, no notification items are created when the setting enable_user_notifications is turned off and on the UI side the user won't see any notifications anymore.


A new method feed_needs_update in database/users.cr has been created in order to ask for Invidious to refresh the user feed without creating a new notification item.

Copy link
Member

@SamantazFox SamantazFox left a comment

Choose a reason for hiding this comment

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

Looks good to me. I've only proposed some rewording of the config option comment.

config/config.example.yml Outdated Show resolved Hide resolved
@unixfox unixfox merged commit 98301a2 into iv-org:master Jan 5, 2023
stavros-k pushed a commit to truecharts/charts that referenced this pull request Oct 1, 2023
Add enable_user_notifications config option to Invidious

This will allow you to toggle `enable_user_notifications` on or off
(default on) via iv-org/invidious#3473

⚒️ Fixes  #13125

- [x] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
Installed the helm chart locally with no errors

**✔️ Checklist:**

- [x] ⚖️ My code follows the style guidelines of this project
- [x] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [x] ⚠️ My changes generate no new warnings
- [x] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [ ] ⬆️ I increased versions for any altered app according to semantic
versioning

---
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.

3 participants