Skip to content

refactor: extract email notification helpers from nested code#3524

Open
nelsonmestevao wants to merge 2 commits into
Logflare:mainfrom
nelsonmestevao:ne/source-emails
Open

refactor: extract email notification helpers from nested code#3524
nelsonmestevao wants to merge 2 commits into
Logflare:mainfrom
nelsonmestevao:ne/source-emails

Conversation

@nelsonmestevao

Copy link
Copy Markdown
Contributor

No description provided.

@nelsonmestevao nelsonmestevao changed the title refactor: extract email notification helpers to satisfy Credo refactor: extract email notification helpers from nested code May 25, 2026
end

defp notify_user(source, rate) do
if source.notifications.user_email_notifications do

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we can use a match for this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am not sure what you mean. On the function signature like so?

Suggested change
if source.notifications.user_email_notifications do
defp notify_user(source = %{notifications: %{user_email_notifications: true}}, rate) do

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yup that's what i mean, but just a small nit

Comment thread lib/logflare/sources/source/email_notification_server.ex Outdated
Comment thread lib/logflare/sources/source/email_notification_server.ex Outdated
@nelsonmestevao nelsonmestevao force-pushed the ne/source-emails branch 4 times, most recently from 0869703 to 1821dc8 Compare May 30, 2026 14:34
@nelsonmestevao nelsonmestevao force-pushed the ne/source-emails branch 5 times, most recently from 6153692 to 65086e0 Compare June 5, 2026 11:24
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.

2 participants