diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index c0970263..6b78b7dd 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -39,6 +39,7 @@ const PostStatusForm = {
return {
dropFiles: [],
submitDisabled: false,
+ error: null,
newStatus: {
status: statusText,
files: []
@@ -90,14 +91,20 @@ const PostStatusForm = {
media: newStatus.files,
store: this.$store,
inReplyToStatusId: this.replyTo
+ }).then((data) => {
+ if (!data.error) {
+ this.newStatus = {
+ status: '',
+ files: []
+ }
+ this.$emit('posted')
+ let el = this.$el.querySelector('textarea')
+ el.style.height = '16px'
+ this.error = null
+ } else {
+ this.error = data.error
+ }
})
- this.newStatus = {
- status: '',
- files: []
- }
- this.$emit('posted')
- let el = this.$el.querySelector('textarea')
- el.style.height = '16px'
},
addMediaFile (fileInfo) {
this.newStatus.files.push(fileInfo)
diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue
index a17d6479..e1e3e4be 100644
--- a/src/components/post_status_form/post_status_form.vue
+++ b/src/components/post_status_form/post_status_form.vue
@@ -19,6 +19,9 @@