diff --git a/js/src/components/Comment/Comment.vue b/js/src/components/Comment/Comment.vue
index 36fa3c5b1..debb4f925 100644
--- a/js/src/components/Comment/Comment.vue
+++ b/js/src/components/Comment/Comment.vue
@@ -13,11 +13,11 @@
{{ comment.actor.name }}
@{{ comment.actor.preferredUsername }}@{{ comment.actor.domain }}
@{{ comment.actor.preferredUsername }}
-
-
@@ -222,6 +222,11 @@ export default class Comment extends Vue {
return `#comment-${this.comment.uuid}`;
}
+ get commentURL(): String {
+ if (!this.comment.local && this.comment.url) return this.comment.url;
+ return this.commentId;
+ }
+
reportModal() {
this.$buefy.modal.open({
parent: this,
diff --git a/js/src/graphql/comment.ts b/js/src/graphql/comment.ts
index 51e5c0cba..acf28b397 100644
--- a/js/src/graphql/comment.ts
+++ b/js/src/graphql/comment.ts
@@ -8,6 +8,7 @@ export const COMMENT_FIELDS_FRAGMENT = gql`
url,
text,
visibility,
+ local,
actor {
avatar {
url
diff --git a/js/src/types/comment.model.ts b/js/src/types/comment.model.ts
index bed61c4b5..0a4f83e1d 100644
--- a/js/src/types/comment.model.ts
+++ b/js/src/types/comment.model.ts
@@ -6,6 +6,7 @@ export interface IComment {
uuid?: string;
url?: string;
text: string;
+ local: boolean;
actor: IActor;
inReplyToComment?: IComment;
originComment?: IComment;
@@ -20,6 +21,7 @@ export class CommentModel implements IComment {
actor: IActor = new Actor();
id?: string;
text: string = '';
+ local: boolean = true;
url?: string;
uuid?: string;
inReplyToComment?: IComment = undefined;
diff --git a/lib/mobilizon/events/comment.ex b/lib/mobilizon/events/comment.ex
index 8f18b0e7f..b3af573dd 100644
--- a/lib/mobilizon/events/comment.ex
+++ b/lib/mobilizon/events/comment.ex
@@ -39,7 +39,8 @@ defmodule Mobilizon.Events.Comment do
:in_reply_to_comment_id,
:origin_comment_id,
:attributed_to_id,
- :deleted_at
+ :deleted_at,
+ :local
]
@attrs @required_attrs ++ @optional_attrs