Bug - link not showing (#2333)

* Bug - link not showing

* Added where location as link on emails

* Location URL test fixes

* URLs validator fixes

Co-authored-by: Alan <[email protected]>
Co-authored-by: zomars <[email protected]>
This commit is contained in:
authored and GitHub committed 2022-03-31 19:57:12 +00:00
1 parent 0494fccb8e
commit f293f8b5c4
3 files changed
+14 -2

No files matched your search

@@ -310,12 +310,16 @@ ${getRichDescription(this.calEvent)}
protected getLocation(): string {
let providerName = this.calEvent.location ? getAppName(this.calEvent.location) : "";
if (this.calEvent.location && this.calEvent.location.includes("integrations:")) {
const location = this.calEvent.location.split(":")[1];
providerName = location[0].toUpperCase() + location.slice(1);
}
// If location its a url, probably we should be validating it with a custom library
if (this.calEvent.location && /^https?:\/\//.test(this.calEvent.location)) {
providerName = this.calEvent.location;
}
if (this.calEvent.videoCallData) {
const meetingId = this.calEvent.videoCallData.id;
const meetingPassword = this.calEvent.videoCallData.password;
@@ -307,6 +307,11 @@ ${getRichDescription(this.calEvent)}
providerName = location[0].toUpperCase() + location.slice(1);
}
// If location its a url, probably we should be validating it with a custom library
if (this.calEvent.location && /^https?:\/\//.test(this.calEvent.location)) {
providerName = this.calEvent.location;
}
if (this.calEvent.videoCallData) {
const meetingId = this.calEvent.videoCallData.id;
const meetingPassword = this.calEvent.videoCallData.password;