aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-12-26 16:19:25 -0600
committerJP Dillingham <jp@dillingham.me>2022-12-26 16:19:25 -0600
commit852fd1322bf5910e1e81a576b91b299415e06f06 (patch)
treef8a8ad0a98983959392131b2b70df9072662e012 /src
parent5276699801f25eec692e48a39c73f45424a22d27 (diff)
downloadslskd-852fd1322bf5910e1e81a576b91b299415e06f06.tar.gz
add Conversation type
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Messaging/Types/Conversation.cs30
1 files changed, 30 insertions, 0 deletions
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 file="Conversation.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
+{
+ 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<PrivateMessage> Messages { get; set; } = new List<PrivateMessage>();
+ }
+}