Closed K4rakara closed 9 months ago
I'm not entirely sure what I'm looking at here - how does it look like if you actually type a message with "test" as the speaker? The thing that seems inconsistent to me is the avatar getting added in the first place.
Typing with test as the speaker adds the characters icon, which is just the default at the moment. Is it not supposed to add the default icon?
Considering you've made your own module, I think it'll probably be easier for you to debug it. Are there any errors in the console? Try setting breakpoints in message-hooks.js in Dorako UX and see if you can figure out why the Avatar renders when you update it, but not when you refresh. You might also want to explore the pf2e-dorako-ux message flags, perhaps the avatars are not defined in the original message, and as such the code that adds the actual image is skipped.
I'll be looking into this over the weekend, I'll let you know if I figure out.
I'm fairly certain that this is being caused by using .updateSource
instead of .update
in addAvatarsToFlags
-- .updateSource
only applies to the local version of the message, whereas .update
actually sends the changes to the backend. Perhaps a second argument could be added to addAvatarsToFlags
that would determine whether .updateSource
or .update
is used.
I'll do some testing locally, if I'm able to make a fix, I'll fork the repo and make a PR.
Thanks, included for next release
Video demonstration
In this screencast, I'm using my own chat enhancement module, which I haven't released yet, but I've also been able to reproduce it with
df-chat-enhance
.List of enabled modules: