Skip to content

Commit 9569397

Browse files
authored
Merge branch 'Corona-Studio:main' into main
2 parents 9eccab6 + c771266 commit 9569397

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ConnectX.Server/Managers/GroupManager.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,10 +684,10 @@ private void OnLeaveGroupReceived(MessageContext<LeaveGroup> ctx)
684684
var group = _groupMappings.Values.First(g => g.Users.Any(u => u.UserId == userId));
685685
var success = new GroupOpResult(GroupCreationStatus.Succeeded);
686686

687-
ctx.Dispatcher.SendAsync(ctx.FromSession, success).Forget();
688-
689687
if (group.RoomOwner.UserId == userId)
690688
{
689+
ctx.Dispatcher.SendAsync(ctx.FromSession, success).Forget();
690+
691691
_groupMappings.TryRemove(group.RoomId, out _);
692692
DeleteGroupNetworkAsync(group).Forget();
693693
NotifyGroupMembersAsync(group, new GroupUserStateChanged(GroupUserStates.Dismissed, null)).Forget();
@@ -699,6 +699,8 @@ private void OnLeaveGroupReceived(MessageContext<LeaveGroup> ctx)
699699

700700
RemoveUser(groupId, userId, ctx.Dispatcher, ctx.FromSession, GroupUserStates.Left);
701701

702+
ctx.Dispatcher.SendAsync(ctx.FromSession, success).Forget();
703+
702704
_logger.LogUserLeftGroup(ctx.FromSession.Id, group.RoomName, group.RoomShortId);
703705
}
704706

0 commit comments

Comments
 (0)