We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db8bf71 commit e29962cCopy full SHA for e29962c
src/features/moodle-calendar-url/background.ts
@@ -22,6 +22,12 @@ export async function syncMoodleCalendarUrl() {
22
return false
23
}
24
25
+ const siteInfo = await moodle.core.webservice.getSiteInfo({})
26
+ if (user.email !== siteInfo.username) {
27
+ console.log('Moodle account does not match InNoHassle account')
28
+ return false
29
+ }
30
+
31
try {
32
const { token } = await moodle.core.calendar.getCalendarExportToken({})
33
if (!token) {
0 commit comments