- Identify web payloads better
- Switch to IconId field name - Add unique id to every message - Automate nodejs build step via csproj - Add unread color to tab opener - Add unread number to tab name - Update ImageSharp dep
This commit is contained in:
@@ -46,7 +46,7 @@ public class Processing
|
||||
if (chunk is IconChunk { } icon)
|
||||
{
|
||||
var iconId = (uint)icon.Icon;
|
||||
return IconUtil.GfdFileView.TryGetEntry(iconId, out _) ? new MessageTemplate {Payload = "icon", Id = iconId}: MessageTemplate.Empty;
|
||||
return IconUtil.GfdFileView.TryGetEntry(iconId, out _) ? new MessageTemplate {PayloadType = WebPayloadType.Icon, IconId = iconId}: MessageTemplate.Empty;
|
||||
}
|
||||
|
||||
if (chunk is TextChunk { } text)
|
||||
@@ -56,7 +56,7 @@ public class Processing
|
||||
var image = EmoteCache.GetEmote(emotePayload.Code);
|
||||
|
||||
if (image is { Failed: false })
|
||||
return new MessageTemplate { Payload = "emote", Color = 0, Content = emotePayload.Code };
|
||||
return new MessageTemplate { PayloadType = WebPayloadType.CustomEmote, Color = 0, Content = emotePayload.Code };
|
||||
}
|
||||
|
||||
var color = text.Foreground;
|
||||
@@ -78,7 +78,7 @@ public class Processing
|
||||
}
|
||||
|
||||
var isNotUrl = text.Link is not UriPayload;
|
||||
return new MessageTemplate { Payload = isNotUrl ? "text" : "url", Color = color.Value, Content = userContent };
|
||||
return new MessageTemplate { PayloadType = isNotUrl ? WebPayloadType.RawText : WebPayloadType.CustomUri, Color = color.Value, Content = userContent };
|
||||
}
|
||||
|
||||
return MessageTemplate.Empty;
|
||||
|
||||
Reference in New Issue
Block a user