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

feat: Option to automatically create share links for recipes in recipe actions #4676

Open
wants to merge 1 commit into
base: mealie-next
Choose a base branch
from

Conversation

ianp1
Copy link

@ianp1 ianp1 commented Dec 3, 2024

What type of PR is this?

  • feature
  • bug

What this PR does / why we need it:

Currently, when using a recipe action on a recipe that is not publicly available (due to recipe, group or household being private), the receiving service will not be able to read the recipe data.

As discussed in #4619, this PR implements an additional template option for recipe actions. The option ${share-link-expires-seconds-<x>} is automatically replaced by a newly created share link that expires after x seconds. This makes share links usable even on private recipes, groups and households.

Which issue(s) this PR fixes:

Fixes #4619

Special notes for your reviewer:

I am not completely certain, if the method to obtain the group slug is correct. Please check this part thoroughly.
Also, i have not yet created documentation for the new option - is the website documentation part of this repository?

Testing

I created a private recipe, a public recipe and multipe recipe actions

  • One containing a single share link template
  • One containing multiple share link templates with different expiry times
  • And one containing multiple share link templates, some of which having the same expiry times

I also tested with different privacy settings in group and household. The receiver of the given action was always able to read the recipes, without being logged in using the share link.

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

Successfully merging this pull request may close these issues.

[BUG] - Recipe actions link to homepage for private recipes
1 participant