public async Task BlockUser(BlockUserInput input) { var userIdentifier = AbpSession.ToUserIdentifier(); var friendIdentifier = new UserIdentifier(input.TenantId, input.UserId); await _friendshipManager.BanFriendAsync(userIdentifier, friendIdentifier); var clients = _onlineClientManager.GetAllByUserId(userIdentifier); if (clients.Any()) { await _chatCommunicator.SendUserStateChangeToClients(clients, friendIdentifier, FriendshipState.Blocked); } }
public async Task BlockUser(BlockUserInput input) { var userIdentifier = AbpSession.ToUserIdentifier(); var friendIdentifier = new UserIdentifier(input.TenantId, input.UserId); await _friendshipManager.BanFriendAsync(userIdentifier, friendIdentifier); }