# Post attributes not correctly set on staged posts when saved?

**URL:** <https://meta.discourse.org/t/post-attributes-not-correctly-set-on-staged-posts-when-saved/28571>\
**Category:** Bug\
**Created:** [10. Mai 2015 um 00:23 UTC](https://meta.discourse.org/t/post-attributes-not-correctly-set-on-staged-posts-when-saved/28571 "2015-05-10T00:23:13Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![lukegb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lukegb/32/114920_2.png) [@lukegb](https://meta.discourse.org/u/lukegb)\
**Post date:** [10. Mai 2015 um 00:23 UTC](https://meta.discourse.org/t/post-attributes-not-correctly-set-on-staged-posts-when-saved/28571/1 "2015-05-10T00:23:13Z")

</div>

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?

---

_[View the full topic](https://meta.discourse.org/t/post-attributes-not-correctly-set-on-staged-posts-when-saved/28571)._
