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

Expiration for all notes (even view constraint notes) #68

Open
andy-g opened this issue Nov 24, 2022 · 7 comments
Open

Expiration for all notes (even view constraint notes) #68

andy-g opened this issue Nov 24, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@andy-g
Copy link

andy-g commented Nov 24, 2022

I've been using https://1ty.me/ but wanted to find a self hosted open source alternative, so was super happy to stumble across your creation today. Thanks so much.

I'm wondering whether it'd be an option to enable expiration for view constrain notes, this will prevent unused notes staying in redis indefinitely, and should be pretty easy to implement with a TTL on the redis key. Generally in my use, I also configure single view notes (so as long as the expected recipient received it I know no-one else has seen it), and I expect someone to pickup the note in the next hour or day etc., so would be nice to be able to configure MAX_EXPIRATION and allow a user to set the expiry for single view notes too.

In essence the combination of Expiration and View count would be very useful.

I don't have much Svelte or rust experience, but would be happy to help out if you feel it's something that'd server the broader use case.

@cupcakearmy cupcakearmy added the enhancement New feature or request label Nov 24, 2022
@cupcakearmy
Copy link
Owner

Yes, I have thought about this as well, makes sense. Maybe the toggle could have like thrid mode in the middle enabling both modes. The current expiration is already using redis TTL (and an additional backend check in case it has not been evicted yet) so the logic mostly is already there.

RN i don't have time to work on this unfortunately, so feel free to contribute, or you'll need some patience ❤️

@PittBie
Copy link

PittBie commented Oct 2, 2023

This feature would be much appreciated!! Making sure an unseen note also will be deleted in say 7 days.

@GreeFine
Copy link

GreeFine commented Jan 4, 2024

If I find the time to work on a PR for this feature, would you have time to review it @cupcakearmy ?

For the UI, I would have replaced the "mode" button, with a checkbox "expire", but I will whatever you prefer, I have no preference on this.

@cupcakearmy
Copy link
Owner

That would be super nice!
I kind of still prefer the toggle to have a "both" position would be nice, to allow either expiration, views or both to be possible. If you find a better solution though i don't have hard preference on it either. We can discuss later :)

@cupcakearmy
Copy link
Owner

@GreeFine also, I appreciate any comment on the rust codebase in general, this was my first rust project, so any improvement / suggestions are welcomed! 😊

@microbearlogist
Copy link

Yes, I have thought about this as well, makes sense. Maybe the toggle could have like thrid mode in the middle enabling both modes. The current expiration is already using redis TTL (and an additional backend check in case it has not been evicted yet) so the logic mostly is already there.

RN i don't have time to work on this unfortunately, so feel free to contribute, or you'll need some patience ❤️

I would even remove the toggler and just leave the two fields : view and time (with a time set to 0 = infinite).
Another units than minutes would also be good (maybe a drop list with only few choices like "no time limit", "1h", "1day", "1 week" ?).

@cupcakearmy
Copy link
Owner

I admit there is room for improvement. Both in UX and functionality here.

Probably removing the toggle makes sense. leaving a field empty would just mean no limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants