diff --git a/ui/src/components/post-form.tsx b/ui/src/components/post-form.tsx index 35d4e5956..7984c2a85 100644 --- a/ui/src/components/post-form.tsx +++ b/ui/src/components/post-form.tsx @@ -516,12 +516,16 @@ export class PostForm extends Component { this.setState(this.state); } else if (res.op == UserOperation.CreatePost) { let data = res.data as PostResponse; - this.state.loading = false; - this.props.onCreate(data.post.id); + if (data.post.creator_id == UserService.Instance.user.id) { + this.state.loading = false; + this.props.onCreate(data.post.id); + } } else if (res.op == UserOperation.EditPost) { let data = res.data as PostResponse; - this.state.loading = false; - this.props.onEdit(data.post); + if (data.post.creator_id == UserService.Instance.user.id) { + this.state.loading = false; + this.props.onEdit(data.post); + } } else if (res.op == UserOperation.Search) { let data = res.data as SearchResponse;