Skip to content

Commit

Permalink
Merge branch 'v5.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
GioBonvi committed Feb 25, 2020
2 parents e44465c + 2409620 commit 157820f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
15 changes: 8 additions & 7 deletions code.gs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ var settings = {
* HOUR OF THE NOTIFICATION
*
* Specify at which hour of the day would you like to receive the email notifications.
* This must be an integer between 0 and 23.
* This must be an integer between 0 and 23. This will set and automatic trigger for
* the script between e.g. 6 and 7 am.
*/
hour: 6,
/*
Expand Down Expand Up @@ -165,9 +166,9 @@ var settings = {
/* NB: Users shouldn't need to (or want to) touch these settings. They are here for the
* convenience of developers/maintainers only.
*/
version: '5.0.0',
version: '5.0.1',
repoName: 'GioBonvi/GoogleContactsEventsNotifier',
gitHubBranch: 'development'
gitHubBranch: 'master'
}
};

Expand Down Expand Up @@ -415,15 +416,15 @@ MergedContact.prototype.getInfoFromContact = function (contactId, eventMonth, ev
});

// Email addresses.
googleContact.getEmails().forEach(function (emailField, i) {
googleContact.getEmails().forEach(function (emailField) {
self.addToField('emails', new EmailAddressDC(
String(emailField.getLabel()),
emailField.getAddress()
));
});

// Phone numbers.
googleContact.getPhones().forEach(function (phoneField, i) {
googleContact.getPhones().forEach(function (phoneField) {
self.addToField('phones', new PhoneNumberDC(
String(phoneField.getLabel()),
phoneField.getPhoneNumber()
Expand Down Expand Up @@ -550,7 +551,7 @@ MergedContact.prototype.getLines = function (type, date, format) {
try {
// Get the default profile image from the cache.
inlineImages['contact-img-' + imgCount] = cache.retrieve(self.data.getProp('photoURL')).getBlob().setName('contact-img-' + imgCount);
line.push('<img src="cid:contact-img-' + imgCount + '" style="height:1.4em;margin-right:0.4em" />');
line.push('<img src="cid:contact-img-' + imgCount + '" style="height:1.4em;margin-right:0.4em" alt="" />');
} catch (err) {
log.add('Unable to get the profile picture with URL ' + self.data.getProp('photoURL'), Priority.WARNING);
}
Expand Down Expand Up @@ -2452,7 +2453,7 @@ function generateEmailNotification (forceDate) {
plaintextLines.forEach(function (line) { bodyBuilder.extend(line); });
htmlBodyBuilder.push(whenIsIt, '</dt><dd style="margin-left:0.4em;padding-left:0"><ul style="list-style:none;margin-left:0;padding-left:0;">');
htmlLines.forEach(function (line) { htmlBodyBuilder.extend(line); });
htmlBodyBuilder.push('</dd></ul>');
htmlBodyBuilder.push('</ul></dd>');
});
});

Expand Down
9 changes: 5 additions & 4 deletions docs/install-and-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ Now that the script is saved in your Google Drive folder we need to activate it.
To do so click the menu `Resources->Advanced Google services`.
In the popup which will open set "Calendar API" to `enabled` (click the switch
on its row on the right) and press "Okay".
Once you have done this open `Resources->Advanced Google services` again and
click on the link which says "Google Cloud Platform API Dashboard": you will be
taken to another page. Click on "Library" in the menu on the left, search for
Once you have done this, open [Google Cloud Platform API Dashboard][Google Cloud
Platform API Dashboard], click on the dropdown menu left at the top, next to
"Google Cloud Platform" and choose your Google Contacts Events Notifier project
from the list, then click on "Library" in the menu on the left, search for
"Google Calendar API" in the search box and open it. Now click `Enable` and
close this page. There is no need to create any credentials as suggested on the
page.
Expand All @@ -122,4 +123,4 @@ contacts' birthday (You should have set how many days before at the beginning).
[Main code file]: https://raw.githubusercontent.com/GioBonvi/GoogleContactsEventsNotifier/master/code.gs
[Google Scripts website]: https://script.google.com
[Google setup birthday calendar]: https://support.google.com/calendar/answer/6084659?hl=en
[Permissions list]: ../README.md#permissions-required
[Permissions list]: ../README.md#permissions-required

0 comments on commit 157820f

Please sign in to comment.