-
Notifications
You must be signed in to change notification settings - Fork 17
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
BC-8193 - Expanding and registering BBB #5354
Conversation
apps/server/src/shared/domain/interface/video-conference-scope.enum.ts
Outdated
Show resolved
Hide resolved
apps/server/src/modules/video-conference/service/video-conference.service.ts
Outdated
Show resolved
Hide resolved
keep code and pr in english |
@@ -65,6 +67,14 @@ describe(ContentElementResponseFactory.name, () => { | |||
expect(result).toBeInstanceOf(DeletedElementResponse); | |||
}); | |||
|
|||
it('should return instance of DeletedElementResponse', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VideoConferenceElementResponse
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, will fix that
apps/server/src/modules/board/controller/mapper/video-conference-element-response.mapper.ts
Show resolved
Hide resolved
@@ -93,4 +97,8 @@ export class BoardNodeDeleteHooksService { | |||
await this.contextExternalToolService.deleteContextExternalTool(linkedTool); | |||
} | |||
} | |||
|
|||
async afterDeleteVideoConferenceElement(videoConferenceElement: VideoConferenceElement): Promise<void> { | |||
await this.filesStorageClientAdapterService.deleteFilesOfParent(videoConferenceElement.id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there files associated with video conference elements?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
during implementation I somewhen had the thought that they would have...now I can not explain how that could be xD
so will remove that, you're right 👍
title: `video conference element #${sequence}`, | ||
position: 0, | ||
children: [], | ||
url: `url #${sequence}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we maybe write a proper URL format, like e.g. https://example.org/#{sequence}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right, that is not very quality like, will change that
|
||
return { | ||
scopeId: element.id, | ||
scopeName: 'video-conference-element', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use an enum
or union type for this? Or is type safety not relevant here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not too sure about it tbh, will investigate on that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems to be fine with the values from VideoConferenceScope
enum, so I will use that for the VC scopeName also in course context
}; | ||
} | ||
case VideoConferenceScope.VIDEO_CONFERENCE_ELEMENT: { | ||
const element = (await this.boardNodeService.findById(scopeId)) as VideoConferenceElement; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use findByClassAndId(VideoConferenceElement, scopId)
to avoid the cast and have the type checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx for the hint 👍
@@ -4,6 +4,8 @@ import { BaseEntityWithTimestamps } from './base.entity'; | |||
export enum TargetModels { | |||
COURSES = 'courses', | |||
EVENTS = 'events', | |||
ROOMS = 'rooms', | |||
VIDEO_CONFERENCE_ELEMENTS = 'video-conference-elements', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quiet long name. Although precise. Maybe we can come up with something shorter. On the other hand we don't know if there will be other elements using VC. An what if we have to implement other VC services other than BBB? 😵💫
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also found myself in that rabbit hole when I thought about the naming. I thought about BBB_ELEMENTS
but that was little to precise and not fitting with the rest of the services for VC. Otherwise something like BOARD_ELEMENTS
could fit, but that would maybe be little too general. Whats your opinion on that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we should stick to 'video-conference-elements'
. Otherwise it would be too unspecific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The video-conference.controller.ts
apis could have better status codes.
Start Conference (PUT :scope/:scopeId/start):
Current: HttpStatus.OK
Better: HttpStatus.CREATED (201) if conference created, HttpStatus.NO_CONTENT (204) if already running.
Join Conference (GET :scope/:scopeId/join):
Current: HttpStatus.OK
Better: HttpStatus.OK (200) is good, but use HttpStatus.NOT_FOUND (404) if conference not running.
Get Conference Info (GET :scope/:scopeId/info):
Current: HttpStatus.OK
Better: HttpStatus.OK (200) is good, but use HttpStatus.NOT_FOUND (404) if no info available.
End Conference (GET :scope/:scopeId/end):
Current: HttpStatus.OK
Better: HttpStatus.NO_CONTENT (204) if successfully ended, HttpStatus.NOT_FOUND (404) if conference not found.
Good PR. Nothing drastic.
General thoughts...
The video conference module is doing too much. It's too big for doing so little. It should not have so much knowledge about the other modules. In essence, what we actually are doing in this module is managing the big blue button server. We are creating instances and returning links. I'm not even sure if it makes sense to know for which context it is used or not. I mean what kind of difference does it make if the conference is used for a room versus for a board? All we need to do is to check if the person is able to create or if the person can join/delete. So basically only the authorization is needed. I think the title does not even need to be pulled from the scoped resource. It can just be an api argument. Whoever is able to create a conference should also be able to set the title and this can be delegated to the front end.
The authorization on the other hand needs to be done. In case we separate the authorization part like in rooms, where we introduce a roomMembership module, we could delete complexity.
return result; | ||
} | ||
|
||
canMap(element: VideoConferenceElement): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe use type unknown
as you want to check the element type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point 👍 maybe I change that for all the other types as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here is another example of our inconsistency of enum value naming. (camel case, kebab case, ...)
We might want to address that in the future @CeEv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need a fallback for url and title ... ?? ''
.
Is there a reason not to trust the type system?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, agree, if we use types we should trust on that
EXTERNAL_TOOL: 'externalTool', | ||
COLLABORATIVE_TEXT_EDITOR: 'collaborativeTextEditor', | ||
DELETED: 'deleted' | ||
FILE: 'file', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to have this list sorted A->Z
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure how this is sorted by openapi to be honest, would not like to handle that file manually
apps/server/src/modules/board/domain/video-conference-element.do.ts
Outdated
Show resolved
Hide resolved
apps/server/src/modules/video-conference/service/video-conference.service.ts
Outdated
Show resolved
Hide resolved
apps/server/src/modules/video-conference/service/video-conference.service.ts
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
Description
Start implementing BBB on boards.
Links to Tickets or other pull requests
BC-8193
hpi-schul-cloud/nuxt-client#3469
hpi-schul-cloud/dof_app_deploy#1061
Changes
Approval for review
generate-client:server
was executed in vue frontend and changes were tested and put in a PR with the same branch name.