Skip to content

Commit

Permalink
Merge branch 'feature/discussions' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Aldemylla committed Nov 23, 2023
2 parents a38867d + 287d761 commit f2c685e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/components/chats/chat/ModalGetChat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ export default {
async setActiveRoom(uuid) {
const room = this.$store.getters['chats/rooms/getRoomById'](uuid);
if (!room) this.$router.push({ name: 'home' });
await this.$store.dispatch('chats/rooms/setActiveRoom', room);
},
},
Expand Down
9 changes: 7 additions & 2 deletions src/views/chats/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ export default {
}
this.isRoomSkeletonActive = false;
}
if (this.$route.name !== 'room' && newValue.uuid !== this.roomId && !this.discussionId) {
if (newValue.uuid !== this.roomId && !this.discussionId) {
this.$router.replace({ name: 'room', params: { roomId: newValue.uuid } });
}
}
Expand Down Expand Up @@ -405,7 +406,11 @@ export default {
return;
}
if (this.$route.name !== 'discussion' && newValue && newValue.uuid !== this.discussionId) {
if (!newValue?.uuid) {
return;
}
if (newValue.uuid !== this.discussionId) {
this.$router.replace({ name: 'discussion', params: { discussionId: newValue.uuid } });
}
}
Expand Down

0 comments on commit f2c685e

Please sign in to comment.