diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-12-29 16:47:43 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-29 16:47:43 -0600 |
| commit | 49bc255026aa5ef2c4df0727134b7627808270fc (patch) | |
| tree | 89349c7aeb4beac343e0e70388dce7063e243388 /src/slskd/Messaging/MessagingService.cs | |
| parent | 5276699801f25eec692e48a39c73f45424a22d27 (diff) | |
| parent | 8352d28eb6eae848530aa2d6b4a4196d53f4ac88 (diff) | |
| download | slskd-49bc255026aa5ef2c4df0727134b7627808270fc.tar.gz | |
Merge pull request #809 from slskd/chat-logs
Save chat logs in a database (prevent message loss when restarting)
Diffstat (limited to 'src/slskd/Messaging/MessagingService.cs')
| -rw-r--r-- | src/slskd/Messaging/MessagingService.cs | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/slskd/Messaging/MessagingService.cs b/src/slskd/Messaging/MessagingService.cs new file mode 100644 index 00000000..d8ec40b6 --- /dev/null +++ b/src/slskd/Messaging/MessagingService.cs @@ -0,0 +1,50 @@ +// <copyright file="MessagingService.cs" company="slskd Team"> +// Copyright (c) slskd Team. All rights reserved. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see https://www.gnu.org/licenses/. +// </copyright> + +namespace slskd.Messaging +{ + /// <summary> + /// Manages private and room messages. + /// </summary> + public interface IMessagingService + { + /// <summary> + /// Gets the <see cref="ConversationService"/>. + /// </summary> + IConversationService Conversations { get; } + } + + /// <summary> + /// Manages private and room messages. + /// </summary> + public class MessagingService : IMessagingService + { + /// <summary> + /// Initializes a new instance of the <see cref="MessagingService"/> class. + /// </summary> + /// <param name="conversations"></param> + public MessagingService(IConversationService conversations) + { + Conversations = conversations; + } + + /// <summary> + /// Gets the <see cref="ConversationService"/>. + /// </summary> + public IConversationService Conversations { get; } + } +}
\ No newline at end of file |
