Skip to content

Add not statements for event mail creator, and fix event_email to event_mail#683

Open
koenjdejong wants to merge 1 commit into
masterfrom
new-event-email-not-creator
Open

Add not statements for event mail creator, and fix event_email to event_mail#683
koenjdejong wants to merge 1 commit into
masterfrom
new-event-email-not-creator

Conversation

@koenjdejong
Copy link
Copy Markdown
Member

@koenjdejong koenjdejong commented Apr 2, 2026

Fixes #546

Used from: #681

Comment thread app/models/event.rb

def send_new_event_email
# Send new event to all leden who have new_event_email enabled
def send_new_event_mail
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Gaat deze rename goed? Waar callen we hem?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nee, gaat niet goed.

event.send_new_event_email

Comment thread app/models/event.rb
if self.usergroup_id.nil?
unless self.attendance # If not dispuutsborrel
User.intern.where(new_event_mail: true).each { |user| UserMailer.mail_new_event(user, self).deliver }
User.intern.where(new_event_mail: true).where.not(id: self.user_id).each { |user| UserMailer.mail_new_event(user, self).deliver }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
User.intern.where(new_event_mail: true).where.not(id: self.user_id).each { |user| UserMailer.mail_new_event(user, self).deliver }
User.intern.where(new_event_mail: true).excluding(user).each { |user| UserMailer.mail_new_event(user, self).deliver }

zou volgens mij ook moeten werken

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.

Do not send new activity email for creator of event

3 participants