From 31bc2f7c1014ee29e02ec7d968ec192886678aad Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 19 Oct 2020 09:26:49 +0200 Subject: [PATCH] Fix redirection after deleting a post Signed-off-by: Thomas Citharel --- js/src/views/Posts/Edit.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/views/Posts/Edit.vue b/js/src/views/Posts/Edit.vue index 7d6428e74..957ac2dc0 100644 --- a/js/src/views/Posts/Edit.vue +++ b/js/src/views/Posts/Edit.vue @@ -97,7 +97,7 @@ import { FETCH_POST, CREATE_POST, UPDATE_POST, DELETE_POST } from "../../graphql import { IPost, PostVisibility } from "../../types/post.model"; import Editor from "../../components/Editor.vue"; -import { IActor, IGroup } from "../../types/actor"; +import { IActor, IGroup, usernameWithDomain } from "../../types/actor"; import TagInput from "../../components/Event/TagInput.vue"; import RouteName from "../../router/name"; import Subtitle from "../../components/Utils/Subtitle.vue"; @@ -233,7 +233,7 @@ export default class EditPost extends Vue { if (data && this.post.attributedTo) { this.$router.push({ name: RouteName.POSTS, - params: { preferredUsername: this.post.attributedTo.preferredUsername }, + params: { preferredUsername: usernameWithDomain(this.post.attributedTo) }, }); } }