fix(room): pet-fertilize chat bubble — bad localization key + wrong target user

Two bugs in the pet rebreed/fertilize chat path: the localization key had a
stray trailing semicolon (`'widget.chatbubble.petrefertilized;'`) so the lookup
failed and the raw key rendered; and the target user was resolved via
`newRoomObject = getRoomObject(event.extraParam)` but then read back by
`roomObject.id` (the speaker), so `userName` was the speaker, not the target.
Use `newRoomObject.id`.
This commit is contained in:
simoleo89
2026-06-13 16:20:59 +02:00
parent 53463b8322
commit a2f8a4dd61
+2 -2
View File
@@ -148,7 +148,7 @@ const useChatWidgetState = () =>
if(chatType === RoomSessionChatEvent.CHAT_TYPE_PET_REBREED_FERTILIZE)
{
textKey = 'widget.chatbubble.petrefertilized;';
textKey = 'widget.chatbubble.petrefertilized';
}
else if(chatType === RoomSessionChatEvent.CHAT_TYPE_PET_SPEED_FERTILIZE)
@@ -162,7 +162,7 @@ const useChatWidgetState = () =>
if(newRoomObject)
{
const newUserData = roomSession.userDataManager.getUserDataByIndex(roomObject.id);
const newUserData = roomSession.userDataManager.getUserDataByIndex(newRoomObject.id);
if(newUserData) targetUserName = newUserData.name;
}