You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When meeting invites are forwarded from Outlook, hyperlinks (for Teams/Webex meetings) are masked by adding safelinks.protection.outlook.com prefix on them and forces the links to be opened via certain apps only.
I used this additional function to replace safelinks server name with google.com
function updateSafelinks(linkData){ var matcherUrl = new RegExp('https:\/\/.*?safelinks.protection.outlook.com\\/.*?\\\?url=','g'); linkData = linkData.replace(matcherUrl,"https://www.google.com/url?q="); return linkData; }
This is called from createEvent
if (descriptionAsTitles && event.hasProperty('description')) var eventSummary = updateSafelinks(icalEvent.description); else if (event.hasProperty('summary')) eventSummary = updateSafelinks(icalEvent.summary);
Why are you appending "https://www.google.com/url?q=" to the safelink? Can't you just take out the "safelinks..." prefix, then decode the rest of the url? I would suggest something like:
function updateSafelinks(linkData){
var matcherUrl = new RegExp('https:\/\/.*?safelinks.protection.outlook.com\\/.*?\\\?url=','g');
linkData = decodeURIComponent(linkData.replace(matcherUrl,""));
return linkData;
}
Otherwise, it seems like an acceptable add to the script. Make this change and start a PR - I'll take a look at it.
The link you provided doesn't seem to clearly say "all reminders are removed from meetings when sharing from Outlook" (and a quick Google search doesn't show me anything to that effect - so it at least isn't well known). But, regardless, I think this is a change to be made on a user-by-user basis and not to put into the main script
E.g:
\nLearn More<https://aka.ms/JoinTeamsMeeting> | Meeting options<https://ap c01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fteams.microsoft.co m%2FmeetingOptions%2F%3ForganizerId%3D86e02103-9c5b-4e5f-9
I used this additional function to replace safelinks server name with google.com
function updateSafelinks(linkData){
var matcherUrl = new RegExp('https:\/\/.*?safelinks.protection.outlook.com\\/.*?\\\?url=','g');
linkData = linkData.replace(matcherUrl,"https://www.google.com/url?q=");
return linkData;
}
This is called from
createEvent
if (descriptionAsTitles && event.hasProperty('description'))
var eventSummary = updateSafelinks(icalEvent.description);
else if (event.hasProperty('summary'))
eventSummary = updateSafelinks(icalEvent.summary);
createEvent
:if (valarms.length > 0){
....
}else{
var overrides = [];
overrides.push({'method' : 'popup', 'minutes' : 5});
newEvent.reminders = {
'useDefault' : false,
'overrides' : overrides
};
}
Please add these enhancements to the original scripts, if found useful.
The text was updated successfully, but these errors were encountered: