Open
Conversation
03fbd23 to
ea24e09
Compare
8e0d5f2 to
c819789
Compare
pyphilia
approved these changes
Feb 16, 2026
| |> Repo.insert() | ||
| end | ||
|
|
||
| def member_marketing_emails(%Account{} = account, enable_emails) do |
Contributor
There was a problem hiding this comment.
Not sure about the name of this function, should it include a mention for "update"?
| end) | ||
|
|
||
| {filtered_audience, | ||
| %{total: length(audience), excluded: length(audience) - length(filtered_audience)}} |
Contributor
There was a problem hiding this comment.
Consider to have a variable for length(audience)?
| {:ok, account} = Accounts.member_marketing_emails(account, false) | ||
|
|
||
| conn | ||
| |> put_flash(:info, "Unsubscribed from marketing emails") |
| {:ok, account} = Accounts.member_marketing_emails(account, true) | ||
|
|
||
| conn | ||
| |> put_flash(:info, "Subscribed to marketing emails") |
| attr :name, :string, required: true | ||
| attr :message, :string, required: true, doc: "The primary message of the email" | ||
| attr :pixel, :string, doc: "The tracking pixel" | ||
| attr :account, :string, doc: "The account (for emails targetting graasp members)" |
Contributor
There was a problem hiding this comment.
Suggested change
| attr :account, :string, doc: "The account (for emails targetting graasp members)" | |
| attr :account, :string, doc: "The account (for emails targeting graasp members)" |
| <div class="flex flex-col gap-1"> | ||
| <span>{@notification.audience} {@recipients.included}</span> | ||
| <span> | ||
| {gettext("Excluded: %{count} (incompatible language, or not subscribed)", |
Contributor
There was a problem hiding this comment.
Suggested change
| {gettext("Excluded: %{count} (incompatible language, or not subscribed)", | |
| {gettext("Excluded: %{count} (incompatible language, or unsubscribed from marketing emails)", |
| <h1>{@page_title}</h1> | ||
| <%= if is_nil(@account.marketing_emails_subscribed_at) do %> | ||
| <p> | ||
| <.icon name="hero-check-circle" class="size-6 text-success mr-2" />You have successfully unsubscribed from marketing emails. |
Contributor
There was a problem hiding this comment.
Should we avoid the mention of marketing? Like using news or updates instead?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #116