app/commands/decidim/meetings/admin/update_meeting.rb in decidim-meetings-0.24.3 vs app/commands/decidim/meetings/admin/update_meeting.rb in decidim-meetings-0.25.0.rc1
- old
+ new
@@ -22,11 +22,11 @@
return broadcast(:invalid) if form.invalid?
transaction do
update_meeting!
send_notification if should_notify_followers?
- schedule_upcoming_meeting_notification if start_time_changed?
+ schedule_upcoming_meeting_notification if meeting.published? && start_time_changed?
update_services!
end
broadcast(:ok, meeting)
end
@@ -57,11 +57,14 @@
latitude: form.latitude,
longitude: form.longitude,
location: form.location,
location_hints: form.location_hints,
private_meeting: form.private_meeting,
- transparent: form.transparent
+ transparent: form.transparent,
+ customize_registration_email: form.customize_registration_email,
+ registration_email_custom_content: form.registration_email_custom_content,
+ show_embedded_iframe: form.show_embedded_iframe
)
end
def update_services!
meeting.services = form.services_to_persist.map do |service|
@@ -78,10 +81,10 @@
followers: meeting.followers
)
end
def should_notify_followers?
- important_attributes.any? { |attr| meeting.previous_changes[attr].present? }
+ meeting.published? && important_attributes.any? { |attr| meeting.previous_changes[attr].present? }
end
def important_attributes
%w(start_time end_time address)
end