Skip to content

Commit

Permalink
Remove the concept of talk slugs (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
reivilibre authored Dec 17, 2024
1 parent b30a57a commit ffc1a02
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 18 deletions.
6 changes: 3 additions & 3 deletions config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ livestream:

# The template for livestreams in talk rooms
# Available variables:
# slug - The shorthand version of the talk name (eg: "matrix-p2p")
# id - The talk's ID
# audId - The auditorium ID the talk is held in (eg: "D.collab")
# jitsi - The Jitsi conference name in lowercase.
talkUrl: "https://stream.example.org/conference-talks/hls/{slug}.m3u8"
talkUrl: "https://stream.example.org/conference-talks/hls/talk-{id}.m3u8"

# The template for livestreams in random rooms.
# Available variables:
Expand Down Expand Up @@ -255,4 +255,4 @@ metrics:
address: 127.0.0.1

# if set to `true` will prevent the conf-bot from sending live invites to email/matrix_ids
dry_run_enabled: false
dry_run_enabled: false
3 changes: 2 additions & 1 deletion src/Conference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,8 @@ export class Conference {

// Calculate all the aliases the room should have, then update the list of bot-assigned aliases to match
const wantedBaseNames = [
(await auditorium.getSlug()) + '-' + talk.slug,
// Talk slugs no longer exist. But if we ever use this feature again, we probably want to reinstate them.
// (await auditorium.getSlug()) + '-' + talk.slug,
'talk-' + talk.id,
];
const wantedPrefixedNames = wantedBaseNames.flatMap(baseName => applyAllAliasPrefixes(baseName, this.config.conference.prefixes.aliases));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ exports[`parsing pentabarf XML: overview: auditoriums 1`] = `
"prerecorded": true,
"pretalxCode": undefined,
"qa_startTime": null,
"slug": "testcon_opening_remarks",
"speakers": [
{
"email": "",
Expand Down Expand Up @@ -63,7 +62,6 @@ exports[`parsing pentabarf XML: overview: conference 1`] = `
"prerecorded": true,
"pretalxCode": undefined,
"qa_startTime": null,
"slug": "testcon_opening_remarks",
"speakers": [
{
"email": "",
Expand Down Expand Up @@ -124,7 +122,6 @@ exports[`parsing pentabarf XML: overview: talks 1`] = `
"prerecorded": true,
"pretalxCode": undefined,
"qa_startTime": null,
"slug": "testcon_opening_remarks",
"speakers": [
{
"email": "",
Expand Down Expand Up @@ -159,7 +156,6 @@ exports[`tracks that set a online qa value correctly apply to talks: talks 1`] =
"prerecorded": true,
"pretalxCode": undefined,
"qa_startTime": 0,
"slug": "testcon_opening_remarks",
"speakers": [
{
"email": "",
Expand Down Expand Up @@ -189,7 +185,6 @@ exports[`tracks that set a online qa value correctly apply to talks: talks 1`] =
"prerecorded": true,
"pretalxCode": undefined,
"qa_startTime": 0,
"slug": "testcon_opening_remarks",
"speakers": [
{
"email": "",
Expand Down Expand Up @@ -219,7 +214,6 @@ exports[`tracks that set a online qa value correctly apply to talks: talks 1`] =
"prerecorded": true,
"pretalxCode": undefined,
"qa_startTime": null,
"slug": "testcon_opening_remarks",
"speakers": [
{
"email": "",
Expand Down Expand Up @@ -249,7 +243,6 @@ exports[`tracks that set a online qa value correctly apply to talks: talks 1`] =
"prerecorded": true,
"pretalxCode": undefined,
"qa_startTime": 0,
"slug": "testcon_opening_remarks",
"speakers": [
{
"email": "",
Expand Down
3 changes: 1 addition & 2 deletions src/backends/json/JsonScheduleLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ export class JsonScheduleLoader {
id: talk.id.toString(), // TODO We have numbers on the rhs and a string on the lhs.
title: talk.title,
subtitle: talk.description, // TODO is this valid?
slug: slugify(talk.title),

auditoriumId,
prerecorded: true, // TODO
Expand Down Expand Up @@ -107,4 +106,4 @@ export class JsonScheduleLoader {
isPhysical: false,
};
}
}
}
1 change: 0 additions & 1 deletion src/backends/penta/PentabarfParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ export class PentabarfParser {
dateTs: dateTs,
startTime: startTime.valueOf(),
endTime: endTime.valueOf(),
slug: pEvent.slug,
title: pEvent.title,
subtitle: pEvent.subtitle,
speakers: [],
Expand Down
3 changes: 1 addition & 2 deletions src/backends/pretalx/PretalxParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ export async function parseFromJSON(rawJson: string, prefixConfig: IPrefixConfig
})), //event.persons,
// TODO: Unsure?
auditoriumId: roomName,
slug: event.slug,
};
talks.set(eventCode, talk);
auditorium?.talks.set(eventCode, talk);
Expand All @@ -208,4 +207,4 @@ export async function parseFromJSON(rawJson: string, prefixConfig: IPrefixConfig
auditoriums,
talks,
}
}
}
1 change: 0 additions & 1 deletion src/models/schedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export interface ITalk {
*/
qa_startTime: number | null;
livestream_endTime: number;
slug: string;
title: string;
subtitle: string;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export async function renderTalkWidget(req: Request, res: Response, conference:

const streamUrl = template(talkUrl, {
audId: audId.toLowerCase(),
slug: (await talk.getDefinition()).slug.toLowerCase(),
id: await talk.getId(),
jitsi: base32.stringify(Buffer.from(talk.roomId), { pad: false }).toLowerCase(),
});

Expand Down

0 comments on commit ffc1a02

Please sign in to comment.