mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user