Browse Source

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>
tags/v21.0.0beta1
Vincent Petry 3 years ago
parent
commit
f7e1706022
No account linked to committer's email address

+ 2
- 2
apps/user_status/js/user-status-menu.js
File diff suppressed because it is too large
View File


+ 1
- 1
apps/user_status/js/user-status-menu.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
apps/user_status/js/user-status-modal.js
File diff suppressed because it is too large
View File


+ 1
- 1
apps/user_status/js/user-status-modal.js.map
File diff suppressed because it is too large
View File


+ 2
- 2
apps/user_status/src/components/SetStatusModal.vue View File

@@ -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 = {

Loading…
Cancel
Save