Fix status clearing with initial empty value

When selecting an emoji but not specifying a message, the internal
message value was null which caused a server validation error on
sending.

This fixes the SetStatusModal to always work with an empty string
upfront, as this is the value the field would have if edited and cleared
manually.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
pull/23305/head
Vincent Petry 2020-10-13 12:01:20 +07:00
parent 547c9dbd51
commit f7e1706022
No known key found for this signature in database
GPG Key ID: E055D6A4D513575C
5 changed files with 8 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -98,7 +98,7 @@ export default {
return {
clearAt: null,
icon: null,
message: null,
message: '',
statuses: getAllStatusOptions(),
}
},
@ -119,7 +119,7 @@ export default {
mounted() {
this.messageId = this.$store.state.userStatus.messageId
this.icon = this.$store.state.userStatus.icon
this.message = this.$store.state.userStatus.message
this.message = this.$store.state.userStatus.message || ''
if (this.$store.state.userStatus.clearAt !== null) {
this.clearAt = {