Change identity from profile popup

This commit is contained in:
10G Meow 2022-02-20 11:38:22 +02:00
parent 128b19ef8f
commit ab749cd932
2 changed files with 35 additions and 6 deletions

View file

@ -7,11 +7,16 @@ export default {
return this.$matrix.matrixClient.getUser(this.$matrix.currentUserId);
},
displayName() {
if (!this.user) {
return null;
displayName: {
get() {
if (!this.user) {
return null;
}
return (this.user.displayName || this.user.userId);
},
set(newValue) {
this.user.displayName = newValue
}
return (this.user.displayName || this.user.userId);
},
userAvatar() {
@ -40,5 +45,8 @@ export default {
this.$navigation.push({path: "/login"}, -1);
})
},
setDisplayName(name) {
this.$matrix.matrixClient.setDisplayName(name);
}
}
}