feat(permissions): Adds server permissions

This commit is contained in:
Michel Fedde 2025-06-24 20:58:46 +02:00
parent d46bbd84c5
commit cf9c88a2d6
24 changed files with 415 additions and 69 deletions

View file

@ -73,14 +73,12 @@ export class ReminderEvent implements TimedEvent {
)
);
const config = groupConfig.getCompleteConfiguration();
const targetChannel = config.channels?.playdateReminders;
const targetChannel = groupConfig.getConfigurationByPath("channels.playdateReminders").value;
if (!targetChannel) {
return Promise.resolve();
}
return this.sendReminder(playdate, targetChannel);
return this.sendReminder(playdate, <ChannelId>targetChannel);
}, this)
await Promise.all(promises);

View file

@ -37,7 +37,7 @@ export async function sendCreatedNotificationEventHandler(event: ElementCreatedE
)
);
const targetChannel = groupConfig.getConfigurationByPath('channels.newPlaydates');
const targetChannel = groupConfig.getConfigurationByPath('channels.newPlaydates').value;
if (!targetChannel) {
return;
}