mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-01-20 11:51:28 +00:00
[fix] @ mentions in chat now redirect to user page
This commit is contained in:
parent
568e314926
commit
9849a13999
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user