From 21f35bd8ee008336e204497595429011da9f1593 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Tue, 14 Sep 2021 08:29:03 -0500 Subject: swap everything back to using ISoulseekClient --- .../Messaging/API/Controllers/ConversationsController.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/slskd/Application/Messaging/API/Controllers/ConversationsController.cs') diff --git a/src/slskd/Application/Messaging/API/Controllers/ConversationsController.cs b/src/slskd/Application/Messaging/API/Controllers/ConversationsController.cs index 961b8ca8..c4341ec1 100644 --- a/src/slskd/Application/Messaging/API/Controllers/ConversationsController.cs +++ b/src/slskd/Application/Messaging/API/Controllers/ConversationsController.cs @@ -38,19 +38,20 @@ namespace slskd.Messaging.API /// /// Initializes a new instance of the class. /// - /// + /// + /// /// public ConversationsController( - IApplication application, + ISoulseekClient soulseekClient, IStateMonitor applicationStateMonotor, IConversationTracker tracker) { - Application = application; + Client = soulseekClient; ApplicationStateMonitor = applicationStateMonotor; Tracker = tracker; } - private IApplication Application { get; } + private ISoulseekClient Client { get; } private IStateMonitor ApplicationStateMonitor { get; } private IConversationTracker Tracker { get; } @@ -77,7 +78,7 @@ namespace slskd.Messaging.API return NotFound(); } - await Application.AcknowledgePrivateMessageAsync(id); + await Client.AcknowledgePrivateMessageAsync(id); return StatusCode(200); } @@ -107,7 +108,7 @@ namespace slskd.Messaging.API { tasks.Add(Task.Run(async () => { - await Application.AcknowledgePrivateMessageAsync(message.Id); + await Client.AcknowledgePrivateMessageAsync(message.Id); message.Acknowledged = true; })); } @@ -201,7 +202,7 @@ namespace slskd.Messaging.API return BadRequest(); } - await Application.SendPrivateMessageAsync(username, message); + await Client.SendPrivateMessageAsync(username, message); // append the outgoing message to the tracker Tracker.AddOrUpdate(username, new PrivateMessage() -- cgit v1.2.3