From 02ab30180c49d05eefabb469c567ea733b247369 Mon Sep 17 00:00:00 2001 From: medievalshell Date: Sun, 31 May 2026 03:39:23 +0200 Subject: [PATCH] fix(chat): relay unknown chat bubble ids instead of resetting to default getBubble() fell back to NORMAL (bubble 0) for any id not in the registered BUBBLES map, so custom client-side chat bubbles (e.g. ids 253+) rendered as the default bubble for everyone. Now unknown positive ids (<=1000) pass through as a transient bubble carrying that id, so the server relays it and clients render their own .bubble- style. No need to enumerate each one. --- .../habbohotel/rooms/RoomChatMessageBubbles.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Emulator/src/main/java/com/eu/habbo/habbohotel/rooms/RoomChatMessageBubbles.java b/Emulator/src/main/java/com/eu/habbo/habbohotel/rooms/RoomChatMessageBubbles.java index d38133e4..fef00f33 100644 --- a/Emulator/src/main/java/com/eu/habbo/habbohotel/rooms/RoomChatMessageBubbles.java +++ b/Emulator/src/main/java/com/eu/habbo/habbohotel/rooms/RoomChatMessageBubbles.java @@ -134,7 +134,18 @@ public class RoomChatMessageBubbles { } public static RoomChatMessageBubbles getBubble(int id) { - return BUBBLES.getOrDefault(id, NORMAL); + RoomChatMessageBubbles bubble = BUBBLES.get(id); + if (bubble != null) return bubble; + + // Custom chat bubbles (client-side only, e.g. ids 253+) are not registered + // above. Instead of falling back to NORMAL (which made them render as the + // default bubble), pass the id through so the server relays it as-is and + // the client renders its own .bubble- style. Capped to avoid abuse. + if (id > 0 && id <= 1000) { + return new RoomChatMessageBubbles(id, "CUSTOM_" + id, "", true, false); + } + + return NORMAL; } private static void registerBubble(RoomChatMessageBubbles bubble) {