diff --git a/app/controllers/buffer_updates_controller.rb b/app/controllers/buffer_updates_controller.rb index fb1a7b94a..803ee121e 100644 --- a/app/controllers/buffer_updates_controller.rb +++ b/app/controllers/buffer_updates_controller.rb @@ -14,7 +14,7 @@ class BufferUpdatesController < ApplicationController BufferUpdate.create( article_id: @article.id, composer_user_id: current_user.id, - body_text: params[:buffer_update][:body_text], + body_text: modified_body_text, social_service_name: "twitter", buffer_profile_id_code: ApplicationConfig["BUFFER_TWITTER_ID"], status: "pending", @@ -29,10 +29,10 @@ class BufferUpdatesController < ApplicationController BufferUpdate.create( article_id: @article.id, composer_user_id: current_user.id, - body_text: params[:buffer_update][:body_text], + body_text: modified_body_text, social_service_name: "twitter", buffer_profile_id_code: tag.buffer_profile_id_code, - tag_id: params[:buffer_update][:tag_id], + tag_id: tag.id, status: "pending", ) end @@ -42,9 +42,11 @@ class BufferUpdatesController < ApplicationController def modified_body_text @user = @article.user if @user.twitter_username.present? - params[:buffer_update][:body_text] + "\n{ author: @#{@user.twitter_username} } #DEVCommunity" + params[:buffer_update][:body_text] + + "\n\n{ author: @#{@user.twitter_username} } #DEVCommunity\n#{ApplicationConfig['APP_PROTOCOL']}#{ApplicationConfig['APP_DOMAIN']}#{@article.path}" else - params[:buffer_update][:body_text] + params[:buffer_update][:body_text] + + " #DEVCommunity\n#{ApplicationConfig['APP_PROTOCOL']}#{ApplicationConfig['APP_DOMAIN']}#{@article.path}" end end end diff --git a/app/views/internal/articles/_individual_article.html.erb b/app/views/internal/articles/_individual_article.html.erb index 1262687bb..1c734f9a5 100644 --- a/app/views/internal/articles/_individual_article.html.erb +++ b/app/views/internal/articles/_individual_article.html.erb @@ -129,8 +129,9 @@
Twitter MAIN
diff --git a/app/views/internal/articles/index.html.erb b/app/views/internal/articles/index.html.erb index 76f13c74c..003e788bf 100644 --- a/app/views/internal/articles/index.html.erb +++ b/app/views/internal/articles/index.html.erb @@ -58,7 +58,7 @@ - +