From 852fd1322bf5910e1e81a576b91b299415e06f06 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Mon, 26 Dec 2022 16:19:25 -0600 Subject: add Conversation type --- src/slskd/Messaging/Types/Conversation.cs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/slskd/Messaging/Types/Conversation.cs (limited to 'src') diff --git a/src/slskd/Messaging/Types/Conversation.cs b/src/slskd/Messaging/Types/Conversation.cs new file mode 100644 index 00000000..5feb7dc8 --- /dev/null +++ b/src/slskd/Messaging/Types/Conversation.cs @@ -0,0 +1,30 @@ +// +// 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/. +// + +namespace slskd.Messaging +{ + using System.Collections.Generic; + using System.Linq; + + public class Conversation + { + public string Username { get; set; } + public bool Active { get; set; } = true; + public bool HasUnacknowledgedMessages => Messages.Any(m => !m.Acknowledged); + public IEnumerable Messages { get; set; } = new List(); + } +} -- cgit v1.2.3