From 62c12915485e6f37dcf625807107e0efcd59460d Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Thu, 22 Jan 2015 02:28:04 +0530 Subject: [PATCH] FIX: user name and title were not showing on post creation --- app/assets/javascripts/discourse/models/composer.js | 2 ++ app/serializers/current_user_serializer.rb | 1 + 2 files changed, 3 insertions(+) diff --git a/app/assets/javascripts/discourse/models/composer.js b/app/assets/javascripts/discourse/models/composer.js index 1e25f9b67..2379584aa 100644 --- a/app/assets/javascripts/discourse/models/composer.js +++ b/app/assets/javascripts/discourse/models/composer.js @@ -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'), diff --git a/app/serializers/current_user_serializer.rb b/app/serializers/current_user_serializer.rb index 7264c65a3..f07cd907e 100644 --- a/app/serializers/current_user_serializer.rb +++ b/app/serializers/current_user_serializer.rb @@ -9,6 +9,7 @@ class CurrentUserSerializer < BasicUserSerializer :site_flagged_posts_count, :moderator?, :staff?, + :title, :reply_count, :topic_count, :enable_quoting,