Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the concept of talk slugs #238

Merged
merged 3 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -64,7 +63,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 @@ -126,7 +124,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 @@ -162,7 +159,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 @@ -193,7 +189,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 @@ -224,7 +219,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 @@ -255,7 +249,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 @@ -108,4 +107,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,
track: pEvent.track,
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 @@ -195,7 +195,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 @@ -210,4 +209,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;
track: 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
Loading