mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
fix: add checks to lesson notifications
This commit is contained in:
+3
-6
@@ -1507,12 +1507,9 @@ function CheckCurrentLesson(lesson: any, num: number) {
|
|||||||
if (Notification.permission === 'granted') {
|
if (Notification.permission === 'granted') {
|
||||||
new Notification('Next Lesson in 5 Minutes:', {
|
new Notification('Next Lesson in 5 Minutes:', {
|
||||||
body:
|
body:
|
||||||
'Subject: ' +
|
`Subject: ${lesson.description}` +
|
||||||
lesson.description +
|
(lesson.room ? `\nRoom: ${lesson.room}` : '') +
|
||||||
' \nRoom: ' +
|
(lesson.staff ? `\nTeacher: ${lesson.staff}` : ''),
|
||||||
lesson.room +
|
|
||||||
' \nTeacher: ' +
|
|
||||||
lesson.staff,
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// request permission from user
|
// request permission from user
|
||||||
|
|||||||
Reference in New Issue
Block a user