Skip to content

Commit 90fc62b

Browse files
authored
Bump Version
1 parent 54d6e64 commit 90fc62b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/Code.gs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ function testGetSuggestedTimes() {
158158
console.log(JSON.stringify(getSuggestedTimes('primary', 'schuitema@hope.edu', '30', '900', '09:00', '17:00', [0, 6], '240', '60'), null, 2))
159159
}
160160

161-
function getSuggestedTimes(myid, theirid, length, step, timeMin, timeMax, daysToExclude, minMinutesFromNow, maxDaysFromNow) {
161+
function getSuggestedTimes(myId, theirId, length, step, timeMin, timeMax, daysToExclude, minMinutesFromNow, maxDaysFromNow) {
162162

163-
if (!theirid || !/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(theirid)) throw 'Invalid email'; // emailregex.com
163+
if (!theirId || !/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(theirId)) throw 'Invalid email'; // emailregex.com
164164

165165
if (!length) throw 'Length is not a valid number';
166166
if (typeof length !== "number") {
@@ -203,12 +203,12 @@ function getSuggestedTimes(myid, theirid, length, step, timeMin, timeMax, daysTo
203203
"timeMax": max.toISO(),
204204
"timeZone": myTimezone,
205205
"items": [
206-
{"id": myid},
207-
{"id": theirid}
206+
{"id": myId},
207+
{"id": theirId}
208208
]
209209
});
210210

211-
if (!freeBusy['calendars'][theirid] || freeBusy['calendars'][theirid]['errors']) throw 'Problem fetching freebusy: ' + JSON.stringify(freeBusy['calendars'][theirid]['errors']);
211+
if (!freeBusy['calendars'][theirId] || freeBusy['calendars'][theirId]['errors']) throw 'Problem fetching freebusy: ' + JSON.stringify(freeBusy['calendars'][theirId]['errors']);
212212

213213
let suggestions = [];
214214

@@ -227,8 +227,8 @@ function getSuggestedTimes(myid, theirid, length, step, timeMin, timeMax, daysTo
227227
if (daysToExclude.includes(nextStep.weekday === 7 ? 0 : nextStep.weekday)) continue; // occurs on day to exclude. luxon sunday is 7, not 0
228228

229229
let timerange = luxon.Interval.fromDateTimes(nextStep, end);
230-
if (freeBusy['calendars'][myid]['busy'].some(busy => timerange.overlaps(luxon.Interval.fromISO(busy['start'] + '/' + busy['end'])))) continue; // busy on mine
231-
if (freeBusy['calendars'][theirid]['busy'].some(busy => timerange.overlaps(luxon.Interval.fromISO(busy['start'] + '/' + busy['end'])))) continue; // busy on theirs
230+
if (freeBusy['calendars'][myId]['busy'].some(busy => timerange.overlaps(luxon.Interval.fromISO(busy['start'] + '/' + busy['end'])))) continue; // busy on mine
231+
if (freeBusy['calendars'][theirId]['busy'].some(busy => timerange.overlaps(luxon.Interval.fromISO(busy['start'] + '/' + busy['end'])))) continue; // busy on theirs
232232

233233
suggestions.push(nextStep);
234234

@@ -287,7 +287,7 @@ function getLuxon_() {
287287
}
288288

289289
function checkGithubReleaseVersion_() {
290-
let currentVersion = 'v0.1.1';
290+
let currentVersion = 'v0.1.2';
291291
let latestRelease;
292292
try {
293293
latestRelease = JSON.parse(UrlFetchApp.fetch('https://api.github.com/repos/leoherzog/ScheduleQuest/releases/latest').getContentText());

src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ <h1 id="typetitle" class="card-title"></h1>
425425
$('#seeEvent').style.display = 'inline';
426426
$('#seeEvent').href = details.htmlLink;
427427
$('dialog')[0].setAttribute('open', true);
428-
toggleMeetingType(meetingTypes[$('#typetitle').dataset.type]);
428+
toggleMeetingType(meetingTypes[$('#typetitle').dataset.type]); // clear and reset form
429429
}
430430

431431
function errorScheduling(error) {

0 commit comments

Comments
 (0)