Przeglądaj źródła

fix for handling person email google calendar IDs

Adam Shaw 11 lat temu
rodzic
commit
d23f2d7d27
1 zmienionych plików z 3 dodań i 2 usunięć
  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 the Google Calendar ID hasn't been explicitly defined
 	if (!googleCalendarId && url) {
 	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;
 			googleCalendarId = url;
 		}
 		}
 		// try to scrape it out of a V1 or V3 API feed URL
 		// try to scrape it out of a V1 or V3 API feed URL