Просмотр исходного кода

fix for handling person email google calendar IDs

Adam Shaw 11 лет назад
Родитель
Сommit
d23f2d7d27
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      src/gcal/gcal.js

+ 3 - 2
src/gcal/gcal.js

@@ -27,8 +27,9 @@ fc.sourceNormalizers.push(function(sourceOptions) {
 	// if the Google Calendar ID hasn't been explicitly defined
 	if (!googleCalendarId && url) {
 
-		// detect if the ID was specified as a single string
-		if ((match = /^[^\/]+@([^\/]+\.)?calendar\.google\.com$/.test(url))) {
+		// detect if the ID was specified as a single string.
+		// will match calendars like "[email protected]" in addition to person email calendars.
+		if ((match = /^[^\/]+@([^\/\.]+\.)*(google|googlemail|gmail)\.com$/.test(url))) {
 			googleCalendarId = url;
 		}
 		// try to scrape it out of a V1 or V3 API feed URL