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

WIP: Join Command #4

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

aswiniip
Copy link

@aswiniip aswiniip commented Jul 28, 2022

The app settings will have a setting which will be a string of room names which are supposed to be the meeting channels where the join command will work. When the join command is called:

  • The string is split and mapped into a function which checks if there is a room with that name and returns an array of rooms.
  • We check if the room where the command is run is present in the meeting channels array
  • There is going to be one argument along with the slash command which will be the password provided by the user to determine the role they will be given.
  • I created an async function getMeetingUrl which takes in different arguments and generates a meeting url. In this getMeetingUrl, before generating the URL the create api call is called which creates the meeting so that the join api call works.
  • While generating the url it is required to have a meetingid which I created using a random GUID value whose function is present in getGUID.ts which would help decreasing the complexity of the app settings.
  • If the meeting url is generated successfully. The url is sent in the notify message to the user who used the slash command.

Copy link
Member

@debdutdeb debdutdeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a clean up.

import { BlockBuilder, TextObjectType } from "@rocket.chat/apps-engine/definition/uikit";
import { IUser } from "@rocket.chat/apps-engine/definition/users";

// I know i can use the app logger but i like this.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this please. This is a serious project, we don't want to commit any staging resources here.

import { IUser } from "@rocket.chat/apps-engine/definition/users";

export class HelpCommand implements ISlashCommand {
public command = "helpmeet";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A slashcommand for showing help message? Why?

import { IUser } from "@rocket.chat/apps-engine/definition/users";
import { getMeetingUrl } from "../functions/getMeetingUrl";

export class JoinCommand implements ISlashCommand {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not being used.

commands/Meet.ts Outdated
await modify.getScheduler().scheduleRecurring({
id: `${commandroom.slugifiedName}`,
// interval: `${mins} ${hrs} * * ${dayind}`,
interval: '20 seconds',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is your test code. Neither appropriate to commit nor part of the scope of this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neither is this part of the pr scope.

@@ -0,0 +1,33 @@
import { IProcessor } from "@rocket.chat/apps-engine/definition/scheduler";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not part of join command.

@@ -0,0 +1,23 @@
import { IHttp, IModify, IPersistence, IRead } from "@rocket.chat/apps-engine/definition/accessors"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not part of join command

@@ -0,0 +1,58 @@
// import { IRead, IModify, IHttp, IPersistence, IModifyCreator, IMessageBuilder } from "@rocket.chat/apps-engine/definition/accessors";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this file.

@@ -0,0 +1,83 @@
import { IRead, IModify, IHttp, IPersistence, IModifyCreator, IMessageBuilder, ILogger } from "@rocket.chat/apps-engine/definition/accessors";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not in PR scope.

import { multipleProcessors } from './reminder/processors/multipleProcessors';
import { weeklyNotification } from './reminder/processors/weeklyNotification';
import { AppSettings } from './settings/appsettings';
import { BbbSettings } from './settings/bbbsettings';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to clean up the imports.

BbbMeetApp.ts Outdated
Comment on lines 48 to 49
await configuration.slashCommands.provideSlashCommand(new ScheduleMeetCommand())
await configuration.slashCommands.provideSlashCommand(new MeetCommand())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are not registering the command that this PR is about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants