There's 4 available slots. Primary weapon, secondary weapon, <unused> and effects. Hats are placed in the <unused> slot. Effects is used for things like the hate emote and the sparks when you teleport. I could move this to the effects slot but it'd overwrite whatever was currently playing in it when you start talking and the bubble would disappear when an emote is used.
There's a messier way to circument this, though.
You could make a loop that snaps the chat bubble's position based on character's head slot. It's unlikely for player to move when he's typing something, tho.