-
Notifications
You must be signed in to change notification settings - Fork 0
[PB-4258]: feat/jaas webhook #19
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
Conversation
- Added `JitsiWebhookModule` to manage Jitsi webhook events. - Implemented `JitsiWebhookController` to handle incoming webhook requests, specifically for `PARTICIPANT_LEFT` events. - Created `JitsiWebhookService` to process participant left events and interact with room management. - Introduced interfaces for Jitsi webhook payloads to ensure type safety. - Enhanced unit tests for the webhook service and controller to validate functionality and error handling. - Updated `package.json` to include `body-parser` dependency for request handling.
… feat/jaas-webhook
|
|
||
| async createCallToken(userUuid: string) { | ||
| const meetFeatures = await this.getMeetFeatureConfigForUser(userUuid); | ||
| async createCallToken(user: User | UserTokenData['payload']) { |
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.
Just curious, what is the difference between User and UserTokenData['payload]? Is it the same? Or User is for authenticated users and UserTokenData['payload'] is for anonymous users?
| service = module.get<JitsiWebhookService>(JitsiWebhookService); | ||
|
|
||
| // Mock logger | ||
| jest.spyOn(Logger.prototype, 'log').mockImplementation(() => undefined); |
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.
Instead of mocking the logger globally, perhaps you could spy on it each time you print a log, so you can verify that the printed message is what we want.
|
|
||
| if (!roomId) { | ||
| this.logger.warn(`Could not extract room ID from FQN: ${payload.fqn}`); | ||
| return; |
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 throwing an error explaining what happens? Or we do not want that?
|
|
||
| if (!participantId) { | ||
| this.logger.warn('Participant ID not found in payload'); | ||
| return; |
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.
Same here
|
|
||
| if (!room) { | ||
| this.logger.warn(`Room with ID ${roomId} not found`); | ||
| return; |
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.
Same here.
[PB-4258] bugfix/Add email support to join call functionality
[PB-4936] fix: webhook signature verification
Implemented jitsi's webhook to handle user disconnects. More info here