Add support for marking and processing web-originated chat messages.

This commit is contained in:
2026-08-08 23:54:03 +02:00
parent 421f6655fd
commit 5a4140c2e2
3 changed files with 26 additions and 13 deletions
@@ -3,7 +3,10 @@ package com.alttd.chat.objects;
import com.alttd.chat.database.Queries;
import com.alttd.chat.objects.channels.Channel;
import com.alttd.chat.util.Utility;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.ComponentLike;
import net.kyori.adventure.text.TextComponent;
import net.kyori.adventure.text.format.NamedTextColor;
import java.util.ArrayList;
import java.util.List;
@@ -89,9 +92,15 @@ public class ChatUser {
return Utility.getStaffPrefix(uuid);
}
public ComponentLike getPrefixAll() {
public ComponentLike getPrefixAll(boolean isWebMessage) {
//return prefixAll;
return Utility.getPrefix(uuid, false);
ComponentLike prefix = Utility.getPrefix(uuid, false);
if (isWebMessage) {
//TODO [Stijn] [2026-08-08]: Check icon
TextComponent webIcon = Component.text("\uD83D\uDEDC").color(NamedTextColor.DARK_AQUA);
prefix = webIcon.append(prefix);
}
return prefix;
}
public String getReplyTarget() {