@@ -23,10 +23,10 @@ import {
2323 StateEventInput ,
2424} from "../lib/matrix.js" ;
2525import Module from "../lib/Module.js" ;
26- import * as OSEM from "../lib/Osem.js" ;
2726import type { Plan , SessionGroupId } from "../lib/Plan.js" ;
27+ import * as Pretalx from "../lib/Pretalx.js" ;
2828import type { Scheduled } from "../lib/scheduling.js" ;
29- import { expect , maxDelay , optional , populate , unimplemented } from "../lib/utilities.js" ;
29+ import { expect , maxDelay , populate , unimplemented } from "../lib/utilities.js" ;
3030import type Patch from "../Patch.js" ;
3131
3232const md = new MarkdownIt ( ) ;
@@ -42,7 +42,7 @@ interface ListedSpace extends Space {
4242 local : string ;
4343}
4444
45- interface Session extends OSEM . Event {
45+ interface Session extends Pretalx . Talk {
4646 day : number ;
4747 open : DateTime ;
4848}
@@ -704,11 +704,10 @@ export default class extends Module {
704704 ) {
705705 const ignore = new Set ( plan . ignore ?? [ ] ) ;
706706
707- this . debug ( "📅 Get sessions" , { conference : plan . conference } ) ;
708- const osemRooms = await OSEM . getRooms ( plan . conference ) ;
709- const osemEvents = await OSEM . getEvents ( plan . conference ) ;
710- const startOfDay = DateTime . min ( ...osemEvents . map ( ( e ) => e . beginning ) ) . startOf ( "day" ) ;
711- const sessions = osemEvents
707+ this . debug ( "📅 Get sessions" , { event : plan . event } ) ;
708+ const talks = await Pretalx . getTalks ( plan . event ) ;
709+ const startOfDay = DateTime . min ( ...talks . map ( ( e ) => e . beginning ) ) . startOf ( "day" ) ;
710+ const sessions = talks
712711 . filter ( ( e ) => ! ignore . has ( e . id ) )
713712 . map ( ( event ) => ( {
714713 ...event ,
@@ -730,21 +729,20 @@ export default class extends Module {
730729 for ( const [ index , session ] of sessions . entries ( ) ) {
731730 const suffix = plan . suffixes ?. [ session . id ] ?? `session-${ session . id } ` ;
732731 const redirect = plan . redirects ?. [ session . id ] ;
733- const venueRoom = osemRooms [ session . room ] ?. name ;
734- const values = { room : venueRoom , title : session . title , url : session . url } ;
732+ const values = { room : session . roomName , title : session . title , url : session . url } ;
735733 const intro = populate ( values , plan . intro ) ;
736734 const topic = populate ( values , plan . topic ) ;
737- const widget = redirect ? undefined : plan . widgets ?. [ session . room ] ?. [ session . day ] ;
735+ const widget = redirect ? undefined : plan . widgets ?. [ session . roomId ] ?. [ session . day ] ;
738736
739737 const local = `${ plan . prefix } ${ suffix } ` ;
740738 const room = await this . reconcileRoom ( inheritedUsers , local , sortKey ( index ) , {
741739 name : [
742740 session . beginning . toFormat ( "EEE HH:mm" ) ,
743- ... optional ( venueRoom ?. replace ( / R o o m (? = \d + ) / , "R" ) ) ,
741+ session . roomName . replace ( / R o o m (? = \d + ) / , "R" ) ,
744742 "·" ,
745743 session . title ,
746744 ] . join ( " " ) ,
747- tag : `osem-event -${ session . id } ` ,
745+ tag : `pretalx-talk -${ session . id } ` ,
748746 ...( intro ? { intro } : { } ) ,
749747 ...( redirect ? { redirect } : { } ) ,
750748 ...( topic ? { topic } : { } ) ,
0 commit comments