public Models.PersonalThread GetPersonalThread(ParticipantUser currentUser, int userId, int threadId, bool includesMessages) { if (userId == currentUser.ID) { return(GetPersonalThread(userId, threadId, includesMessages, q => q)); } else { var fg = new FriendGraph(db); return(GetPersonalThread(userId, threadId, includesMessages, q => fg.Filter(q, currentUser.ID))); } }
public IList <Models.PersonalThread> GetPersonalThreads(ParticipantUser currentUser, int userId, int pageNumber, int pageSize, bool includesMessages) { if (userId == currentUser.ID) { return(GetPersonalThreads(userId, pageNumber, pageSize, includesMessages, q => q)); } else { var fg = new FriendGraph(db); return(GetPersonalThreads(userId, pageNumber, pageSize, includesMessages, q => fg.Filter(q, currentUser.ID))); } }