Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/components/NewMessage/NewMessage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,15 @@ export default {
},

userAbsence() {
return this.chatExtrasStore.absence[this.token]
const absence = this.chatExtrasStore.absence[this.token]
if (!absence) {
return null
}

const now = new Date()
const firstDay = new Date(absence.firstDay)
const lastDay = new Date(absence.lastDay)
return (now > firstDay && now < lastDay) ? absence : null
},
},

Expand Down