Add alt text to the challenge event post

This commit is contained in:
Matt Isenhower
2023-06-03 11:10:28 -07:00
parent 54f895e30b
commit 3efe04ec9c

View File

@@ -34,9 +34,13 @@ export default class ChallengeStatus extends StatusGenerator
/** @param {ScreenshotHelper} screenshotHelper */
async _getMedia(screenshotHelper) {
let schedule = await this.getActiveSchedule();
let media = new Media;
media.file = await screenshotHelper.capture('challenges');
media.altText = schedule.settings.leagueMatchEvent.regulation?.replace(/<br \/>/g, '\n');
return media;
}
}