app/commands/decidim/meetings/update_meeting.rb in decidim-meetings-0.25.2 vs app/commands/decidim/meetings/update_meeting.rb in decidim-meetings-0.26.0.rc1
- old
+ new
@@ -61,11 +61,12 @@
available_slots: form.available_slots,
registration_terms: { I18n.locale => form.registration_terms },
registrations_enabled: form.registrations_enabled,
type_of_meeting: form.clean_type_of_meeting,
online_meeting_url: form.online_meeting_url,
- show_embedded_iframe: form.show_embedded_iframe
+ iframe_embed_type: form.iframe_embed_type,
+ iframe_access_level: form.iframe_access_level
},
visibility: "public-only"
)
end
@@ -89,13 +90,15 @@
def start_time_changed?
meeting.previous_changes["start_time"].present?
end
def schedule_upcoming_meeting_notification
+ return if meeting.start_time < Time.zone.now
+
checksum = Decidim::Meetings::UpcomingMeetingNotificationJob.generate_checksum(meeting)
Decidim::Meetings::UpcomingMeetingNotificationJob
- .set(wait_until: meeting.start_time - 2.days)
+ .set(wait_until: meeting.start_time - Decidim::Meetings.upcoming_meeting_notification)
.perform_later(meeting.id, checksum)
end
end
end
end