fix: XivChatType respects the configured chat channel if not set (#2001)

This commit is contained in:
KazWolfe 2024-11-12 08:23:22 -08:00 committed by GitHub
parent c0f05614c6
commit 67e6bcac61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -168,8 +168,10 @@ internal sealed unsafe class ChatGui : IInternalDisposableService, IChatGui
var sender = Utf8String.FromSequence(chat.Name.Encode());
var message = Utf8String.FromSequence(replacedMessage.BuiltString.Encode());
var targetChannel = chat.Type ?? this.configuration.GeneralChatType;
this.HandlePrintMessageDetour(RaptureLogModule.Instance(), chat.Type, sender, message, chat.Timestamp, (byte)(chat.Silent ? 1 : 0));
this.HandlePrintMessageDetour(RaptureLogModule.Instance(), targetChannel, sender, message, chat.Timestamp, (byte)(chat.Silent ? 1 : 0));
sender->Dtor(true);
message->Dtor(true);

View file

@ -10,7 +10,7 @@ public sealed class XivChatEntry
/// <summary>
/// Gets or sets the type of entry.
/// </summary>
public XivChatType Type { get; set; } = XivChatType.Debug;
public XivChatType? Type { get; set; }
/// <summary>
/// Gets or sets the message timestamp.