Skip to content

Commit

Permalink
Merge pull request #13306 from nextcloud/fix/noid/upcoming-events-guest
Browse files Browse the repository at this point in the history
fix(TopBar): do not fetch events if actor is a guest or it is not ini…
  • Loading branch information
DorraJaouad authored Sep 15, 2024
2 parents 9b1bfde + b0d79ea commit 655c23b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/TopBar/TopBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,18 @@ export default {
return this.nextEvent && !this.isInCall && !this.isSidebar && !this.isMobile
&& this.conversation.type !== CONVERSATION.TYPE.NOTE_TO_SELF
},
getUserId() {
return this.$store.getters.getUserId()
},
},
watch: {
token: {
immediate: true,
handler(value) {
if (!value || this.isSidebar) {
if (!value || this.isSidebar || !this.getUserId) {
// Do not fetch upcoming events for guests (401 unauthorzied) or in sidebar
return
}
this.chatExtrasStore.getUpcomingEvents(value)
Expand Down

0 comments on commit 655c23b

Please sign in to comment.