I’ve noticed that the user class attributes don’t seem to be set correctly (on the poster-name component) when a post is saved from the composer. Obviously the issue goes away when the page is refreshed and it’s only evident for the person who posted it, but it’s annoying none-the-less - we apply some theming based on a user’s primary group.
I note that a subset of a post’s attributes are set here:
https://github.com/discourse/discourse/blob/bed7781fe21edd1ac7369d81fb3c1584186ed025/app/assets/javascripts/discourse/models/composer.js.es6#L474-L492
but that doesn’t include attributes like staff
or primary_group_name
.
Is this an actual bug or expected behaviour? What would be the correct way to fix it - just add the new attributes, or replace the post in the post stream with the version of the post from the server?