2.1.0 (#123)
All checks were successful
Tag and Release Lightless / tag-and-release (push) Successful in 2m9s
All checks were successful
Tag and Release Lightless / tag-and-release (push) Successful in 2m9s
# Patchnotes 2.1.0 The changes in this update are more than just "patches". With a new UI, a new feature, and a bunch of bug fixes, improvements and a new member on the dev team, we thought this was more of a minor update. We would like to introduce @tsubasahane of MareCN to the team! We’re happy to work with them to bring Lightless and its features to the CN client as well as having another talented dev bring features and ideas to us. Speaking of which: # Location Sharing (Big shout out to @tsubasahane for bringing this feature) - Are you TIRED of scrambling to find the address of the venue you're in to share with your friends? We are introducing Location Sharing! An optional feature where you can share your location with direct pairs temporarily [30 minutes, 1 hour, 3 hours] minutes or until you turn it off for them. That's up to you! [#125](<#125>) [#49](<Lightless-Sync/LightlessServer#49>) - To share your location with a pair, click the three dots beside the pair and choose a duration to share with them. [#125](<#125>) [#49](<Lightless-Sync/LightlessServer#49>) - To view the location of someone who's shared with you, simply hover over the globe icon! [#125](<#125>) [#49](<Lightless-Sync/LightlessServer#49>) [1] # Model Optimization (Mesh Decimating) - This new option can automatically “simplify” incoming character meshes to help performance by reducing triangle counts. You choose how strong the reduction is (default/recommended is 80%). [#131](<#131>) - Decimation only kicks in when a mesh is above a certain triangle threshold, and only for the items that qualify for it and you selected for. [#131](<#131>) - Hair meshes is always excluded, since simplifying hair meshes is very prone to breaking. - You can find everything under Settings → Performance → Model Optimization. [#131](<#131>) + ** IF YOU HAVE USED DECIMATION IN TESTING, PLEASE CLEAR YOUR CACHE ❗ ** [2] # Animation (PAP) Validation (Safer animations) - Lightless now checks your currently animations to see if they work with your local skeleton/bone mod. If an animation matches, it’s included in what gets sent to other players. If it doesn’t, Lightless will skip it and write a warning to your log showing how many were skipped due to skeleton changes. Its defaulted to Unsafe (off). turn it on if you experience crashes from others users. [#131](<#131>) - Lightless also does the same kind of check for incoming animation files, to make sure they match the body/skeleton they were sent with. [#131](<#131>) - Because these checks can sometimes be a little picky, you can adjust how strict they are in Settings -> General -> Animation & Bones to reduce false positives. [#131](<#131>) # UI Changes (Thanks to @kyuwu for UI Changes) - The top part of the main screen has gotten a makeover. You can adjust the colors of the gradiant in the Color settings of Lightless. [#127](<#127>) [3] - Settings have gotten some changes as well to make this change more universal, and will use the same color settings. [#127](<#127>) - The particle effects of the gradient are toggleable in 'Settings -> UI -> Behavior' [#127](<#127>) - Instead of showing download/upload on bottom of Main UI, it will show VRAM usage and triangles with their optimization options next to it [#138](<#138>) # LightFinder / ShellFinder - UI Changes that follow our new design follow the color codes for the Gradient top as the main screen does. [#127](<#127>) [4] Co-authored-by: defnotken <itsdefnotken@gmail.com> Co-authored-by: azyges <aaaaaa@aaa.aaa> Co-authored-by: cake <admin@cakeandbanana.nl> Co-authored-by: Tsubasa <tsubasa@noreply.git.lightless-sync.org> Co-authored-by: choco <choco@patat.nl> Co-authored-by: celine <aaa@aaa.aaa> Co-authored-by: celine <celine@noreply.git.lightless-sync.org> Co-authored-by: Tsubasahane <wozaiha@gmail.com> Co-authored-by: cake <cake@noreply.git.lightless-sync.org> Reviewed-on: #123
This commit was merged in pull request #123.
This commit is contained in:
@@ -8,18 +8,26 @@ using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using LightlessSync.UI.Services;
|
||||
using LightlessSync.LightlessConfiguration;
|
||||
using LightlessSync.LightlessConfiguration.Models;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace LightlessSync.Services.Chat;
|
||||
|
||||
public sealed class ZoneChatService : DisposableMediatorSubscriberBase, IHostedService
|
||||
{
|
||||
private const int MaxMessageHistory = 150;
|
||||
private const int MaxMessageHistory = 200;
|
||||
internal const int MaxOutgoingLength = 200;
|
||||
private const int MaxUnreadCount = 999;
|
||||
private const string ZoneUnavailableMessage = "Zone chat is only available in major cities.";
|
||||
private const string ZoneChannelKey = "zone";
|
||||
private const int MaxReportReasonLength = 100;
|
||||
private const int MaxReportContextLength = 1000;
|
||||
private static readonly JsonSerializerOptions PersistedHistorySerializerOptions = new()
|
||||
{
|
||||
PropertyNameCaseInsensitive = true,
|
||||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
|
||||
};
|
||||
|
||||
private readonly ApiController _apiController;
|
||||
private readonly DalamudUtilService _dalamudUtilService;
|
||||
@@ -376,6 +384,7 @@ public sealed class ZoneChatService : DisposableMediatorSubscriberBase, IHostedS
|
||||
|
||||
public Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
LoadPersistedSyncshellHistory();
|
||||
Mediator.Subscribe<DalamudLoginMessage>(this, _ => HandleLogin());
|
||||
Mediator.Subscribe<DalamudLogoutMessage>(this, _ => HandleLogout());
|
||||
Mediator.Subscribe<ZoneSwitchEndMessage>(this, _ => ScheduleZonePresenceUpdate());
|
||||
@@ -1000,11 +1009,22 @@ public sealed class ZoneChatService : DisposableMediatorSubscriberBase, IHostedS
|
||||
|
||||
private void OnChatMessageReceived(ChatMessageDto dto)
|
||||
{
|
||||
var descriptor = dto.Channel.WithNormalizedCustomKey();
|
||||
var key = descriptor.Type == ChatChannelType.Zone ? ZoneChannelKey : BuildChannelKey(descriptor);
|
||||
var fromSelf = IsMessageFromSelf(dto, key);
|
||||
var message = BuildMessage(dto, fromSelf);
|
||||
ChatChannelDescriptor descriptor = dto.Channel.WithNormalizedCustomKey();
|
||||
string key = descriptor.Type == ChatChannelType.Zone ? ZoneChannelKey : BuildChannelKey(descriptor);
|
||||
bool fromSelf = IsMessageFromSelf(dto, key);
|
||||
ChatMessageEntry message = BuildMessage(dto, fromSelf);
|
||||
bool mentionNotificationsEnabled = _chatConfigService.Current.EnableMentionNotifications;
|
||||
bool notifyMention = mentionNotificationsEnabled
|
||||
&& !fromSelf
|
||||
&& descriptor.Type == ChatChannelType.Group
|
||||
&& TryGetSelfMentionToken(dto.Message, out _);
|
||||
|
||||
string? mentionChannelName = null;
|
||||
string? mentionSenderName = null;
|
||||
bool publishChannelList = false;
|
||||
bool shouldPersistHistory = _chatConfigService.Current.PersistSyncshellHistory;
|
||||
List<PersistedChatMessage>? persistedMessages = null;
|
||||
string? persistedChannelKey = null;
|
||||
|
||||
using (_sync.EnterScope())
|
||||
{
|
||||
@@ -1042,6 +1062,12 @@ public sealed class ZoneChatService : DisposableMediatorSubscriberBase, IHostedS
|
||||
state.Messages.RemoveAt(0);
|
||||
}
|
||||
|
||||
if (notifyMention)
|
||||
{
|
||||
mentionChannelName = state.DisplayName;
|
||||
mentionSenderName = message.DisplayName;
|
||||
}
|
||||
|
||||
if (string.Equals(_activeChannelKey, key, StringComparison.Ordinal))
|
||||
{
|
||||
state.HasUnread = false;
|
||||
@@ -1058,10 +1084,29 @@ public sealed class ZoneChatService : DisposableMediatorSubscriberBase, IHostedS
|
||||
}
|
||||
|
||||
MarkChannelsSnapshotDirtyLocked();
|
||||
|
||||
if (shouldPersistHistory && state.Type == ChatChannelType.Group)
|
||||
{
|
||||
persistedChannelKey = state.Key;
|
||||
persistedMessages = BuildPersistedHistoryLocked(state);
|
||||
}
|
||||
}
|
||||
|
||||
Mediator.Publish(new ChatChannelMessageAdded(key, message));
|
||||
|
||||
if (persistedMessages is not null && persistedChannelKey is not null)
|
||||
{
|
||||
PersistSyncshellHistory(persistedChannelKey, persistedMessages);
|
||||
}
|
||||
|
||||
if (notifyMention)
|
||||
{
|
||||
string channelName = mentionChannelName ?? "Syncshell";
|
||||
string senderName = mentionSenderName ?? "Someone";
|
||||
string notificationText = $"You were mentioned by {senderName} in {channelName}.";
|
||||
Mediator.Publish(new NotificationMessage("Syncshell mention", notificationText, NotificationType.Info));
|
||||
}
|
||||
|
||||
if (publishChannelList)
|
||||
{
|
||||
using (_sync.EnterScope())
|
||||
@@ -1108,6 +1153,113 @@ public sealed class ZoneChatService : DisposableMediatorSubscriberBase, IHostedS
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool TryGetSelfMentionToken(string message, out string matchedToken)
|
||||
{
|
||||
matchedToken = string.Empty;
|
||||
if (string.IsNullOrWhiteSpace(message))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
HashSet<string> tokens = BuildSelfMentionTokens();
|
||||
if (tokens.Count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return TryFindMentionToken(message, tokens, out matchedToken);
|
||||
}
|
||||
|
||||
private HashSet<string> BuildSelfMentionTokens()
|
||||
{
|
||||
HashSet<string> tokens = new(StringComparer.OrdinalIgnoreCase);
|
||||
string uid = _apiController.UID;
|
||||
if (IsValidMentionToken(uid))
|
||||
{
|
||||
tokens.Add(uid);
|
||||
}
|
||||
|
||||
string displayName = _apiController.DisplayName;
|
||||
if (IsValidMentionToken(displayName))
|
||||
{
|
||||
tokens.Add(displayName);
|
||||
}
|
||||
|
||||
return tokens;
|
||||
}
|
||||
|
||||
private static bool IsValidMentionToken(string value)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < value.Length; i++)
|
||||
{
|
||||
if (!IsMentionChar(value[i]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool TryFindMentionToken(string message, IReadOnlyCollection<string> tokens, out string matchedToken)
|
||||
{
|
||||
matchedToken = string.Empty;
|
||||
if (tokens.Count == 0 || string.IsNullOrEmpty(message))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
while (index < message.Length)
|
||||
{
|
||||
if (message[index] != '@')
|
||||
{
|
||||
index++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (index > 0 && IsMentionChar(message[index - 1]))
|
||||
{
|
||||
index++;
|
||||
continue;
|
||||
}
|
||||
|
||||
int start = index + 1;
|
||||
int end = start;
|
||||
while (end < message.Length && IsMentionChar(message[end]))
|
||||
{
|
||||
end++;
|
||||
}
|
||||
|
||||
if (end == start)
|
||||
{
|
||||
index++;
|
||||
continue;
|
||||
}
|
||||
|
||||
string token = message.Substring(start, end - start);
|
||||
if (tokens.Contains(token))
|
||||
{
|
||||
matchedToken = token;
|
||||
return true;
|
||||
}
|
||||
|
||||
index = end;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static bool IsMentionChar(char value)
|
||||
{
|
||||
return char.IsLetterOrDigit(value) || value == '_' || value == '-' || value == '\'';
|
||||
}
|
||||
|
||||
private ChatMessageEntry BuildMessage(ChatMessageDto dto, bool fromSelf)
|
||||
{
|
||||
var displayName = ResolveDisplayName(dto, fromSelf);
|
||||
@@ -1364,6 +1516,313 @@ public sealed class ZoneChatService : DisposableMediatorSubscriberBase, IHostedS
|
||||
return 0;
|
||||
}
|
||||
|
||||
private void LoadPersistedSyncshellHistory()
|
||||
{
|
||||
if (!_chatConfigService.Current.PersistSyncshellHistory)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Dictionary<string, string> persisted = _chatConfigService.Current.SyncshellChannelHistory;
|
||||
if (persisted.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
List<string> invalidKeys = new();
|
||||
foreach (KeyValuePair<string, string> entry in persisted)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(entry.Key) || string.IsNullOrWhiteSpace(entry.Value))
|
||||
{
|
||||
invalidKeys.Add(entry.Key);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!TryDecodePersistedHistory(entry.Value, out List<PersistedChatMessage> persistedMessages))
|
||||
{
|
||||
invalidKeys.Add(entry.Key);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (persistedMessages.Count == 0)
|
||||
{
|
||||
invalidKeys.Add(entry.Key);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (persistedMessages.Count > MaxMessageHistory)
|
||||
{
|
||||
int startIndex = Math.Max(0, persistedMessages.Count - MaxMessageHistory);
|
||||
persistedMessages = persistedMessages.GetRange(startIndex, persistedMessages.Count - startIndex);
|
||||
}
|
||||
|
||||
List<ChatMessageEntry> restoredMessages = new(persistedMessages.Count);
|
||||
foreach (PersistedChatMessage persistedMessage in persistedMessages)
|
||||
{
|
||||
if (!TryBuildRestoredMessage(entry.Key, persistedMessage, out ChatMessageEntry restoredMessage))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
restoredMessages.Add(restoredMessage);
|
||||
}
|
||||
|
||||
if (restoredMessages.Count == 0)
|
||||
{
|
||||
invalidKeys.Add(entry.Key);
|
||||
continue;
|
||||
}
|
||||
|
||||
using (_sync.EnterScope())
|
||||
{
|
||||
_messageHistoryCache[entry.Key] = restoredMessages;
|
||||
}
|
||||
}
|
||||
|
||||
if (invalidKeys.Count > 0)
|
||||
{
|
||||
foreach (string key in invalidKeys)
|
||||
{
|
||||
persisted.Remove(key);
|
||||
}
|
||||
|
||||
_chatConfigService.Save();
|
||||
}
|
||||
}
|
||||
|
||||
private List<PersistedChatMessage> BuildPersistedHistoryLocked(ChatChannelState state)
|
||||
{
|
||||
int startIndex = Math.Max(0, state.Messages.Count - MaxMessageHistory);
|
||||
List<PersistedChatMessage> persistedMessages = new(state.Messages.Count - startIndex);
|
||||
for (int i = startIndex; i < state.Messages.Count; i++)
|
||||
{
|
||||
ChatMessageEntry entry = state.Messages[i];
|
||||
if (entry.Payload is not { } payload)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
persistedMessages.Add(new PersistedChatMessage(
|
||||
payload.Message,
|
||||
entry.DisplayName,
|
||||
entry.FromSelf,
|
||||
entry.ReceivedAtUtc,
|
||||
payload.SentAtUtc));
|
||||
}
|
||||
|
||||
return persistedMessages;
|
||||
}
|
||||
|
||||
private void PersistSyncshellHistory(string channelKey, List<PersistedChatMessage> persistedMessages)
|
||||
{
|
||||
if (!_chatConfigService.Current.PersistSyncshellHistory)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Dictionary<string, string> persisted = _chatConfigService.Current.SyncshellChannelHistory;
|
||||
if (persistedMessages.Count == 0)
|
||||
{
|
||||
if (persisted.Remove(channelKey))
|
||||
{
|
||||
_chatConfigService.Save();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
string? base64 = EncodePersistedMessages(persistedMessages);
|
||||
if (string.IsNullOrWhiteSpace(base64))
|
||||
{
|
||||
if (persisted.Remove(channelKey))
|
||||
{
|
||||
_chatConfigService.Save();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
persisted[channelKey] = base64;
|
||||
_chatConfigService.Save();
|
||||
}
|
||||
|
||||
private static string? EncodePersistedMessages(List<PersistedChatMessage> persistedMessages)
|
||||
{
|
||||
if (persistedMessages.Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
byte[] jsonBytes = JsonSerializer.SerializeToUtf8Bytes(persistedMessages, PersistedHistorySerializerOptions);
|
||||
return Convert.ToBase64String(jsonBytes);
|
||||
}
|
||||
|
||||
private static bool TryDecodePersistedHistory(string base64, out List<PersistedChatMessage> persistedMessages)
|
||||
{
|
||||
persistedMessages = new List<PersistedChatMessage>();
|
||||
if (string.IsNullOrWhiteSpace(base64))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
byte[] jsonBytes = Convert.FromBase64String(base64);
|
||||
List<PersistedChatMessage>? decoded = JsonSerializer.Deserialize<List<PersistedChatMessage>>(jsonBytes, PersistedHistorySerializerOptions);
|
||||
if (decoded is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
persistedMessages = decoded;
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool TryBuildRestoredMessage(string channelKey, PersistedChatMessage persistedMessage, out ChatMessageEntry restoredMessage)
|
||||
{
|
||||
restoredMessage = default;
|
||||
string messageText = persistedMessage.Message;
|
||||
DateTime sentAtUtc = persistedMessage.SentAtUtc;
|
||||
if (string.IsNullOrWhiteSpace(messageText) && persistedMessage.LegacyPayload is { } legacy)
|
||||
{
|
||||
messageText = legacy.Message;
|
||||
sentAtUtc = legacy.SentAtUtc;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(messageText))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
ChatChannelDescriptor descriptor = BuildDescriptorFromChannelKey(channelKey);
|
||||
ChatSenderDescriptor sender = new ChatSenderDescriptor(
|
||||
ChatSenderKind.Anonymous,
|
||||
string.Empty,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
false);
|
||||
|
||||
ChatMessageDto payload = new ChatMessageDto(descriptor, sender, messageText, sentAtUtc, string.Empty);
|
||||
restoredMessage = new ChatMessageEntry(payload, persistedMessage.DisplayName, persistedMessage.FromSelf, persistedMessage.ReceivedAtUtc);
|
||||
return true;
|
||||
}
|
||||
|
||||
private static ChatChannelDescriptor BuildDescriptorFromChannelKey(string channelKey)
|
||||
{
|
||||
if (string.Equals(channelKey, ZoneChannelKey, StringComparison.Ordinal))
|
||||
{
|
||||
return new ChatChannelDescriptor { Type = ChatChannelType.Zone };
|
||||
}
|
||||
|
||||
int separatorIndex = channelKey.IndexOf(':', StringComparison.Ordinal);
|
||||
if (separatorIndex <= 0 || separatorIndex >= channelKey.Length - 1)
|
||||
{
|
||||
return new ChatChannelDescriptor { Type = ChatChannelType.Group };
|
||||
}
|
||||
|
||||
string typeValue = channelKey[..separatorIndex];
|
||||
if (!int.TryParse(typeValue, out int parsedType))
|
||||
{
|
||||
return new ChatChannelDescriptor { Type = ChatChannelType.Group };
|
||||
}
|
||||
|
||||
string customKey = channelKey[(separatorIndex + 1)..];
|
||||
ChatChannelType channelType = parsedType switch
|
||||
{
|
||||
(int)ChatChannelType.Zone => ChatChannelType.Zone,
|
||||
(int)ChatChannelType.Group => ChatChannelType.Group,
|
||||
_ => ChatChannelType.Group
|
||||
};
|
||||
|
||||
return new ChatChannelDescriptor
|
||||
{
|
||||
Type = channelType,
|
||||
CustomKey = customKey
|
||||
};
|
||||
}
|
||||
|
||||
public void ClearPersistedSyncshellHistory(bool clearLoadedMessages)
|
||||
{
|
||||
bool shouldPublish = false;
|
||||
bool saveConfig = false;
|
||||
|
||||
using (_sync.EnterScope())
|
||||
{
|
||||
Dictionary<string, List<ChatMessageEntry>> cache = _messageHistoryCache;
|
||||
if (cache.Count > 0)
|
||||
{
|
||||
List<string> keysToRemove = new();
|
||||
foreach (string key in cache.Keys)
|
||||
{
|
||||
if (!string.Equals(key, ZoneChannelKey, StringComparison.Ordinal))
|
||||
{
|
||||
keysToRemove.Add(key);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (string key in keysToRemove)
|
||||
{
|
||||
cache.Remove(key);
|
||||
}
|
||||
|
||||
if (keysToRemove.Count > 0)
|
||||
{
|
||||
shouldPublish = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (clearLoadedMessages)
|
||||
{
|
||||
foreach (ChatChannelState state in _channels.Values)
|
||||
{
|
||||
if (state.Type != ChatChannelType.Group)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state.Messages.Count == 0 && state.UnreadCount == 0 && !state.HasUnread)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
state.Messages.Clear();
|
||||
state.HasUnread = false;
|
||||
state.UnreadCount = 0;
|
||||
_lastReadCounts[state.Key] = 0;
|
||||
shouldPublish = true;
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary<string, string> persisted = _chatConfigService.Current.SyncshellChannelHistory;
|
||||
if (persisted.Count > 0)
|
||||
{
|
||||
persisted.Clear();
|
||||
saveConfig = true;
|
||||
}
|
||||
|
||||
if (shouldPublish)
|
||||
{
|
||||
MarkChannelsSnapshotDirtyLocked();
|
||||
}
|
||||
}
|
||||
|
||||
if (saveConfig)
|
||||
{
|
||||
_chatConfigService.Save();
|
||||
}
|
||||
|
||||
if (shouldPublish)
|
||||
{
|
||||
PublishChannelListChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class ChatChannelState
|
||||
{
|
||||
public ChatChannelState(string key, ChatChannelType type, string displayName, ChatChannelDescriptor descriptor)
|
||||
@@ -1400,4 +1859,12 @@ public sealed class ZoneChatService : DisposableMediatorSubscriberBase, IHostedS
|
||||
bool IsOwner);
|
||||
|
||||
private readonly record struct PendingSelfMessage(string ChannelKey, string Message);
|
||||
|
||||
public sealed record PersistedChatMessage(
|
||||
string Message = "",
|
||||
string DisplayName = "",
|
||||
bool FromSelf = false,
|
||||
DateTime ReceivedAtUtc = default,
|
||||
DateTime SentAtUtc = default,
|
||||
[property: JsonPropertyName("Payload")] ChatMessageDto? LegacyPayload = null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user