add(conversation):完善私聊好友会话服务

This commit is contained in:
2026-01-03 22:13:28 +08:00
35 changed files with 456 additions and 54 deletions
@@ -0,0 +1,7 @@
namespace IM_API.Tools
{
public class SignalRMethodDefine
{
public static string ReceiveMessage = "ReceiveMessage";
}
}
+17
View File
@@ -0,0 +1,17 @@
namespace IM_API.Tools
{
public static class StreamKeyBuilder
{
public static string Private(long a, long b)
{
if (a <= 0 || b <= 0) throw new ArgumentException();
return $"p:{(a < b ? $"{a}_{b}" : $"{b}_{a}")}";
}
public static string Group(long groupId)
{
if (groupId <= 0) throw new ArgumentException();
return $"g:{groupId}";
}
}
}