Skip to content

Commit

Permalink
fix: delete rooms even if user is already deleted from MariaDB
Browse files Browse the repository at this point in the history
  • Loading branch information
tkuzynow committed Aug 22, 2024
1 parent 3a287be commit c07de3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ public void removeFromGroupAndIgnoreGroupNotFound() {
session.getGroupId(), consultants)));
}

public void removeFromGroup() {
this.consultantsToRemoveFromSessions.forEach(
((session, consultants) ->
removeConsultantsFromSessionGroup(session.getGroupId(), consultants)));
}

/**
* Removes the given consultant from Rocket.Chat group of given session with rollback on error.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ private void removeUnauthorizedMembers(
.onSessionConsultants(Map.of(session, consultantsToRemoveFromRocketChat));

if (rcGroupId.equalsIgnoreCase(session.getGroupId())) {
rocketChatRemoveFromGroupOperationService.removeFromGroupAndIgnoreGroupNotFound();
rocketChatRemoveFromGroupOperationService.removeFromGroup();
}
if (rcGroupId.equalsIgnoreCase(session.getFeedbackGroupId())) {
rocketChatRemoveFromGroupOperationService.removeFromFeedbackGroup();
Expand Down

0 comments on commit c07de3b

Please sign in to comment.