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

Support extended room names #210

Merged
merged 3 commits into from
Jan 24, 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
12 changes: 6 additions & 6 deletions src/commands/HelpCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ export class HelpCommand implements ICommand {
"</code></pre>" +
"<h4>People management:</h4>" +
"<pre><code>" +
"!conference verify &lt;aud&gt; - Dumps information about who would be invited to which rooms when\n" +
" the invite command is run for the auditorium.\n" +
"!conference invite [aud] - Issues invites to all the people to their relevant rooms. If an [aud] is\n" +
" supplied, only that auditorium will receive invites.\n" +
"!conference permissions - Updates moderator status for everyone that is supposed to have it.\n" +
"!conference attendance - Checks the status of invites across the conference.\n" +
"!conference verify &lt;aud&gt; [backstage] - Dumps information about who would be invited to which rooms when\n" +
" the invite command is run for the auditorium.\n" +
"!conference invite [aud] - Issues invites to all the people to their relevant rooms. If an [aud] is\n" +
" supplied, only that auditorium will receive invites.\n" +
"!conference permissions - Updates moderator status for everyone that is supposed to have it.\n" +
"!conference attendance - Checks the status of invites across the conference.\n" +
"</code></pre>" +
"<h4>Bridge management:</h4>" +
"<pre><code>" +
Expand Down
2 changes: 1 addition & 1 deletion src/commands/RunCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class RunCommand implements ICommand {
constructor(private readonly client: MatrixClient, private readonly conference: Conference, private readonly scheduler: Scheduler) {}

public async run(roomId: string, event: any, args: string[]) {
const audId = args[0];
const audId = args.join(" ");
if (audId === "all") {
await this.scheduler.addAuditorium("all");
} else {
Expand Down
12 changes: 10 additions & 2 deletions src/commands/VerifyCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,18 @@ export class VerifyCommand implements ICommand {
constructor(private readonly client: MatrixClient, private readonly conference: Conference) {}

public async run(roomId: string, event: any, args: string[]) {
const audId = args[0];
let audId;
let backstage = args[args.length - 1] === "backstage";
if (backstage) {
const aud_slice = args.slice(0, -1)
audId = aud_slice.join(" ")
}
else {
audId = args.join(" ");
}

let aud: PhysicalRoom = this.conference.getAuditorium(audId);
if (args.includes("backstage")) {
if (backstage) {
aud = this.conference.getAuditoriumBackstage(audId);
}

Expand Down
5 changes: 3 additions & 2 deletions src/commands/actions/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ export async function runRoleCommand(action: IAction, conference: Conference, cl
const skipTalks = args.includes("notalks");

if (args[0] && args[0] !== "backstage") {
const aud = backstageOnly ? conference.getAuditoriumBackstage(args[0]) : conference.getAuditorium(args[0]);
const audId = args.join(" ")
const aud = backstageOnly ? conference.getAuditoriumBackstage(audId) : conference.getAuditorium(audId);
if (!aud) {
const spiRoom = conference.getInterestRoom(args[0]);
const spiRoom = conference.getInterestRoom(audId);
if (!spiRoom) return client.replyNotice(roomId, event, "Unknown auditorium/interest room");
await doInterestResolveAction(action, client, spiRoom, conference, isInvite);
} else {
Expand Down
Loading