예제 #1
0
        public async Task AcceptFriendshipRequest(AcceptFriendshipRequestInput input)
        {
            var userIdentifier = AbpSession.ToUserIdentifier();
            var friendIdentifier = new UserIdentifier(input.TenantId, input.UserId);
            await _friendshipManager.AcceptFriendshipRequestAsync(userIdentifier, friendIdentifier);

            var clients = _onlineClientManager.GetAllByUserId(userIdentifier);
            if (clients.Any())
            {
                await _chatCommunicator.SendUserStateChangeToClients(clients, friendIdentifier, FriendshipState.Blocked);
            }
        }
예제 #2
0
 public async Task AcceptFriendshipRequest(AcceptFriendshipRequestInput input)
 {
     var userIdentifier   = AbpSession.ToUserIdentifier();
     var friendIdentifier = new UserIdentifier(input.TenantId, input.UserId);
     await _friendshipManager.AcceptFriendshipRequestAsync(userIdentifier, friendIdentifier);
 }