Stop using metadata for sharing text

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2020-06-16 16:21:08 +02:00
parent 5c3592cc63
commit 08b4fb9b08
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
2 changed files with 1 additions and 19 deletions

View File

@ -67,10 +67,7 @@ export default class ShareEventModal extends Vue {
}
get emailShareUrl(): string {
return `mailto:?to=&body=${this.event.url}${encodeURIComponent(
"\n\n"
// @ts-ignore
)}${ShareEventModal.textDescription}&subject=${this.event.title}`;
return `mailto:?to=&body=${this.event.url}&subject=${this.event.title}`;
}
get diasporaShareUrl(): string {
@ -78,13 +75,6 @@ export default class ShareEventModal extends Vue {
this.event.title
)}&url=${encodeURIComponent(this.event.url)}`;
}
static get textDescription(): string {
const meta = document.querySelector("meta[property='og:description']");
if (!meta) return "";
const desc = meta.getAttribute("content") || "";
return desc.substring(0, 1000);
}
}
</script>
<style lang="scss" scoped>

View File

@ -944,7 +944,6 @@ export default class Event extends EventMixin {
// @ts-ignore
.share({
title: this.event.title,
text: Event.textDescription,
url: this.event.url,
})
.then(() => console.log("Successful share"))
@ -985,13 +984,6 @@ export default class Event extends EventMixin {
: this.event.beginsOn;
}
static get textDescription(): string {
const meta = document.querySelector("meta[property='og:description']");
if (!meta) return "";
const desc = meta.getAttribute("content") || "";
return desc.substring(0, 1000);
}
get eventCapacityOK(): boolean {
if (this.event.draft) return true;
if (!this.event.options.maximumAttendeeCapacity) return true;