chat implemented

This commit is contained in:
andrei-mihnea-cerbu
2024-04-08 11:41:48 +03:00
parent 48eb2adcbd
commit 90604e48ae
101 changed files with 1493 additions and 116 deletions
@@ -0,0 +1,18 @@
namespace Application.Endpoints.Chats;
public class ChatIdentifier
{
public static string GenerateChatId(Guid id1, Guid id2)
{
// Convert GUIDs to strings
string strId1 = id1.ToString();
string strId2 = id2.ToString();
// Sort the GUID strings
string firstId = strId1.CompareTo(strId2) < 0 ? strId1 : strId2;
string secondId = strId1.CompareTo(strId2) < 0 ? strId2 : strId1;
// Combine them to get a symmetric string
return firstId + "-" + secondId;
}
}