Fix preview

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-10-10 12:25:32 +02:00
parent 4d1780c58d
commit ac35e4b923
3 changed files with 18 additions and 2 deletions

View File

@@ -474,7 +474,13 @@ export default class Event extends EventMixin {
}
get emailShareUrl(): string {
return `mailto:?to=&body=${this.event.url}${encodeURIComponent('\n\n')}${this.event.description}&subject=${this.event.title}`;
return `mailto:?to=&body=${this.event.url}${encodeURIComponent('\n\n')}${this.textDescription}&subject=${this.event.title}`;
}
get textDescription(): string {
const meta = document.querySelector("meta[property='og:description']");
if (!meta) return '';
return meta.getAttribute('content') || '';
}
}