mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Fix incorrect error log in discord forwarding when the local player sends a chat. Player links are seemingly only included in the payload for clickable names; when the local player sends a chat message, the entire sender payload is just their name as text
This commit is contained in:
parent
6d57da2fec
commit
f74f2b803b
1 changed files with 6 additions and 1 deletions
|
|
@ -187,7 +187,12 @@ namespace Dalamud.DiscordBot {
|
||||||
string senderWorld;
|
string senderWorld;
|
||||||
|
|
||||||
if (playerLink == null) {
|
if (playerLink == null) {
|
||||||
Log.Error("playerLink was null. Sender: {0}", BitConverter.ToString(sender.RawData));
|
// chat messages from the local player do not include a player link, and are just the raw name
|
||||||
|
// but we should still track other instances to know if this is ever an issue otherwise
|
||||||
|
if (parsedSender.TextValue != this.dalamud.ClientState.LocalPlayer.Name)
|
||||||
|
{
|
||||||
|
Log.Error("playerLink was null. Sender: {0}", BitConverter.ToString(sender.RawData));
|
||||||
|
}
|
||||||
|
|
||||||
senderName = wasOutgoingTell ? this.dalamud.ClientState.LocalPlayer.Name : parsedSender.TextValue;
|
senderName = wasOutgoingTell ? this.dalamud.ClientState.LocalPlayer.Name : parsedSender.TextValue;
|
||||||
senderWorld = this.dalamud.ClientState.LocalPlayer.HomeWorld.Name;
|
senderWorld = this.dalamud.ClientState.LocalPlayer.HomeWorld.Name;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue