refactor (bbb-web): Add more info for Removed User Session. (#21436)

* bbb-web: Add more info for Removed User Session.
Includes fullname, userExtId and meetingExtId, that will be useful for integrations.

* fix userId prop name when fetching from removedUserSession
This commit is contained in:
Gustavo Trott 2024-10-15 09:07:21 -03:00 committed by GitHub
parent a6c307c8b9
commit a52586f217
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 4 deletions

View File

@ -202,7 +202,10 @@ public class MeetingService implements MessageListener {
UserSessionBasicData removedUser = new UserSessionBasicData();
removedUser.meetingId = us.meetingID;
removedUser.extMeetingId = us.externMeetingID;
removedUser.userId = us.internalUserId;
removedUser.extUserId = us.externUserID;
removedUser.userFullName = us.fullname;
removedUser.sessionToken = us.authToken;
removedUser.role = us.role;
removedSessions.put(token, removedUser);

View File

@ -22,7 +22,10 @@ package org.bigbluebutton.api.domain;
public class UserSessionBasicData {
public String sessionToken = null;
public String userId = null;
public String extUserId = null;
public String meetingId = null;
public String extMeetingId = null;
public String userFullName = null;
public String role = null;
public Boolean isModerator() {

View File

@ -115,10 +115,10 @@ class ConnectionController {
UserSessionBasicData removedUserSession = meetingService.getRemovedUserSessionWithSessionToken(sessionToken)
if(removedUserSession) {
response.addHeader("Meeting-Id", removedUserSession.meetingId)
response.addHeader("Meeting-External-Id", removedUserSession.externMeetingID)
response.addHeader("User-Id", removedUserSession.internalUserId)
response.addHeader("User-External-Id", removedUserSession.externUserID)
response.addHeader("User-Name", URLEncoder.encode(removedUserSession.fullname, StandardCharsets.UTF_8.name()))
response.addHeader("Meeting-External-Id", removedUserSession.extMeetingId)
response.addHeader("User-Id", removedUserSession.userId)
response.addHeader("User-External-Id", removedUserSession.extUserId)
response.addHeader("User-Name", URLEncoder.encode(removedUserSession.userFullName, StandardCharsets.UTF_8.name()))
response.addHeader("User-Is-Moderator", removedUserSession.isModerator() ? "true" : "false")
response.addHeader("User-Is-Presenter", "false")
response.setStatus(200)