[fix] @ mentions in chat now redirect to user page

This commit is contained in:
Markus 2023-07-28 14:35:43 +02:00
parent 568e314926
commit 9849a13999

View File

@ -27,6 +27,7 @@
@fetch-more-rooms="fetchRooms"
@add-room="toggleUserSearch"
@show-demo-options="showDemoOptions = $event"
@open-user-tag="redirectToUserProfile($event.detail[0])"
>
<div
v-if="selectedRoom && selectedRoom.roomId"
@ -447,6 +448,13 @@ export default {
// this.loading = false
})
},
redirectToUserProfile({user}){
let userID = user.id
let userName = user.name.toLowerCase().replaceAll(" ", "-")
let url = `/profile/${userID}/${userName}`
this.$router.push({ path: url });
}
},
}
</script>