public bool InviteFriend(int userId, string friendName) { bool result = FriendDAO.Invite(userId, friendName); if (result) { foreach (var client in _connectedClients) { if (client.Key.ToLower() == friendName.ToLower()) { client.Value.connection.GetInvites(); } } } return(result); }
public bool IsFriendOrInvited(int userId, int friendId) { return(FriendDAO.IsFriendOrInvited(userId, friendId)); }
public string FindById(int id) { return(FriendDAO.FindById(id)); }
public List <string> FindByName(string name) { return(FriendDAO.Find(name)); }
public List <string> GetInvited(int userId) { return(FriendDAO.GetInvited(userId)); }
public List <string> GetContacts(int userId) { return(FriendDAO.GetContacts(userId)); }
public void Reject(int id) { FriendDAO.Reject(id); }
public void Accept(int id) { FriendDAO.Accept(id); }