From 5edc402a011a81ae898795222569f270f93f2a77 Mon Sep 17 00:00:00 2001
From: Thomas Citharel
Date: Wed, 3 Feb 2021 09:34:22 +0100
Subject: [PATCH] Fix showing event origin when the event organizer is a group
Related to !806 and #561
Signed-off-by: Thomas Citharel
---
js/src/views/Event/Event.vue | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/js/src/views/Event/Event.vue b/js/src/views/Event/Event.vue
index 290dee24f..b8d688e78 100755
--- a/js/src/views/Event/Event.vue
+++ b/js/src/views/Event/Event.vue
@@ -125,9 +125,9 @@
-
+
- {{ event.organizerActor.domain }}
+ {{ organizer.domain }}
@@ -443,7 +443,7 @@
@@ -959,7 +959,7 @@ export default class Event extends EventMixin {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
this.$refs.reportModal.close();
- if (!this.event.organizerActor) return;
+ if (!this.organizer) return;
const eventTitle = this.event.title;
try {
@@ -967,7 +967,7 @@ export default class Event extends EventMixin {
mutation: CREATE_REPORT,
variables: {
eventId: this.event.id,
- reportedId: this.actorForReport ? this.actorForReport.id : null,
+ reportedId: this.organizer ? this.organizer.id : null,
content,
forward,
},
@@ -1240,7 +1240,7 @@ export default class Event extends EventMixin {
);
}
- get actorForReport(): IActor | null {
+ get organizer(): IActor | null {
if (this.event.attributedTo && this.event.attributedTo.id) {
return this.event.attributedTo;
}
@@ -1250,9 +1250,9 @@ export default class Event extends EventMixin {
return null;
}
- get domainForReport(): string | null {
- if (this.actorForReport) {
- return this.actorForReport.domain;
+ get organizerDomain(): string | null {
+ if (this.organizer) {
+ return this.organizer.domain;
}
return null;
}