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

Resend voucher #1748

Open
ateuber opened this issue Aug 9, 2020 · 7 comments · May be fixed by #1812
Open

Resend voucher #1748

ateuber opened this issue Aug 9, 2020 · 7 comments · May be fixed by #1812

Comments

@ateuber
Copy link
Contributor

ateuber commented Aug 9, 2020

Some people tend to forget that they received a voucher. It would be nice if a voucher could be linked to an email address and be sent again.

@Sohalt
Copy link
Contributor

Sohalt commented Oct 15, 2020

I would have a go at implementing this.
When emailing vouchers this currently gets saved in the comment field, so it would be possible to read the email address from there. However I feel that's not very clean and was thinking of introducing a howshared field or similar, that other plugins could also potentially use (e.g. one could imagine a plugin sharing vouchers through a messenger or social media).
Then maybe the resend action could be made into a signal that plugins can subscribe to, to allow plugins to resend a voucher via some other means. Not sure if this is over complicating things though. What are your thoughts @raphaelm? And would you accept a PR for this?

@raphaelm
Copy link
Member

Doing this pluggable indeed sounds a bit more complicated than necessary. I see how this could be useful, but since we only allow sharing by email when creating the voucher, I think only supporting email when "re-sharing" it would also be good for now.

@Sohalt
Copy link
Contributor

Sohalt commented Oct 16, 2020

So would you be OK with parsing the email address from the comment field?

@raphaelm
Copy link
Member

No, I think we can afford a recipient email field or something like this on the voucher model :)

@Sohalt
Copy link
Contributor

Sohalt commented Oct 16, 2020

When resending the voucher it would be nice to reuse the same message that was sent the first time. The message is not saved with the voucher however, but in the log. What do you think of getting the message and recipient from the voucher's log entries? This would also remove the need for a recipient field. I feel a little bad about abusing the log as a form of data storage however (but then the sendmail plugin already does the same).

@raphaelm
Copy link
Member

Meh, parsing the log really doesn't sound clean. Storing the full message in the voucher model also really doesn't :( I'm a little bit out of good ideas here, but even without storing the text it would be a start.

@ateuber
Copy link
Contributor Author

ateuber commented Oct 17, 2020

Probably an own issue, but what about templates for emails? I think this would be even better than just sending exactly the same mail again, because the information in the original mail could be outdated when resending the voucher.

@Sohalt Sohalt linked a pull request Oct 17, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants