From bddc41b7adda5879df93a0e0f8f6cafa2d4b40f5 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Tue, 26 Mar 2024 15:09:05 +0100 Subject: [PATCH] FIX: correctly pass down calendar options (#26370) Prior to this fix the options were not passed down when the user had no default calendar. No test as it's mostly an interaction between discourse-calendar and core which is hard to test. --- .../app/components/modal/download-calendar.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/modal/download-calendar.js b/app/assets/javascripts/discourse/app/components/modal/download-calendar.js index 55e66c4cd06..152241d9880 100644 --- a/app/assets/javascripts/discourse/app/components/modal/download-calendar.js +++ b/app/assets/javascripts/discourse/app/components/modal/download-calendar.js @@ -4,7 +4,7 @@ import { action } from "@ember/object"; import { service } from "@ember/service"; import { downloadGoogle, downloadIcs } from "discourse/lib/download-calendar"; -export default class downloadCalendar extends Component { +export default class DownloadCalendar extends Component { @service currentUser; @tracked selectedCalendar = "ics"; @@ -23,13 +23,19 @@ export default class downloadCalendar extends Component { downloadIcs( this.args.model.calendar.title, this.args.model.calendar.dates, - this.args.model.calendar.recurrenceRule + { + recurrenceRule: this.args.model.calendar.recurrenceRule, + } ); } else { downloadGoogle( this.args.model.calendar.title, this.args.model.calendar.dates, - this.args.model.calendar.recurrenceRule + { + recurrenceRule: this.args.model.calendar.recurrenceRule, + location: this.args.model.calendar.location, + details: this.args.model.calendar.details, + } ); } this.args.closeModal();