Merge pull request #6646 from Ocelot-Social-Community/6634-correct-chat-usertag-profile-link

fix(webapp): correct chat usertag profile link
This commit is contained in:
Hannes Heine 2023-07-31 11:52:21 +02:00 committed by GitHub
commit f489766ca4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 }) {
const userID = user.id
const userName = user.name.toLowerCase().replaceAll(' ', '-')
const url = `/profile/${userID}/${userName}`
this.$router.push({ path: url })
},
},
}
</script>