浏览代码

Update Post component, rewrite local post urls

Daniel Supernault 4 月之前
父节点
当前提交
d2f2a1b1cf
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      resources/assets/components/Post.vue

+ 3 - 0
resources/assets/components/Post.vue

@@ -203,6 +203,9 @@
                     this.post = res.data;
                     this.media = this.post.media_attachments;
                     this.profile = this.post.account;
+                    if(res.data.account && res.data.account.local) {
+                        window.history.pushState({}, '', `/p/${res.data.account.acct}/${res.data.id}`);
+                    }
                     if(this.post.in_reply_to_id) {
                         this.fetchReply();
                     } else {