FIX: user name and title were not showing on post creation

This commit is contained in:
Arpit Jalan 2015-01-22 02:28:04 +05:30
parent 0a24c3cb5f
commit 62c1291548
2 changed files with 3 additions and 0 deletions

View file

@ -530,9 +530,11 @@ Discourse.Composer = Discourse.Model.extend({
imageSizes: opts.imageSizes,
cooked: this.getCookedHtml(),
reply_count: 0,
name: currentUser.get('name'),
display_username: currentUser.get('name'),
username: currentUser.get('username'),
user_id: currentUser.get('id'),
user_title: currentUser.get('title'),
uploaded_avatar_id: currentUser.get('uploaded_avatar_id'),
user_custom_fields: currentUser.get('custom_fields'),
post_type: Discourse.Site.currentProp('post_types.regular'),

View file

@ -9,6 +9,7 @@ class CurrentUserSerializer < BasicUserSerializer
:site_flagged_posts_count,
:moderator?,
:staff?,
:title,
:reply_count,
:topic_count,
:enable_quoting,