From b42d1fea954ebc93ecd5a8451db469af1cc76795 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 31 Dec 2023 16:45:44 -0600 Subject: rename GetGroup to ResolveGroup, allow stats and status to be passed in --- src/slskd/Users/IUserService.cs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'src/slskd/Users/IUserService.cs') diff --git a/src/slskd/Users/IUserService.cs b/src/slskd/Users/IUserService.cs index 88090f9f..885b00e5 100644 --- a/src/slskd/Users/IUserService.cs +++ b/src/slskd/Users/IUserService.cs @@ -36,13 +36,6 @@ namespace slskd.Users /// IReadOnlyList WatchedUsernames { get; } - /// - /// Gets the name of the group for the specified . - /// - /// The username of the peer. - /// The group for the specified username. - string GetGroup(string username); - /// /// Retrieves peer . /// @@ -86,6 +79,20 @@ namespace slskd.Users /// A value indicating whether the username is watched. bool IsWatched(string username); + /// + /// Resolves the name of the group for the specified . + /// + /// + /// If the user is watched, and therefore the application is tracking their status and statistics, leech and privilege + /// detection works as expected. If the user is not watched, their status and statistics can be specified. If the user + /// is neither watched nor status and statistics are supplied, leech and privilege detection will not work. + /// + /// The username of the peer. + /// The optional status for the user. + /// The optional statistics for the user. + /// The group for the specified username. + string ResolveGroup(string username, Status status = null, Statistics statistics = null); + /// /// Adds the specified username to the server-side user list. /// -- cgit v1.2.3