diff --git a/controllers/public/community_hub_plugin_public_controller.rb b/controllers/public/community_hub_plugin_public_controller.rb index e42da5f..f062458 100644 --- a/controllers/public/community_hub_plugin_public_controller.rb +++ b/controllers/public/community_hub_plugin_public_controller.rb @@ -192,6 +192,7 @@ class CommunityHubPluginPublicController < PublicController if ( message.title == 'hub-message-twitter' ) mediation.source = 'twitter' mediation.author_name = message.name + mediation.external_link = message.profile_picture elsif ( message.title == 'hub-message-facebook' ) mediation.source = 'facebook' mediation.author_name = message.name diff --git a/twitter/stream.rb b/twitter/stream.rb index e94896f..87e8aa5 100644 --- a/twitter/stream.rb +++ b/twitter/stream.rb @@ -43,7 +43,7 @@ def listen_twitter_stream(hub, author_id) comment.title = 'hub-message-twitter' comment.source = hub comment.body = UTF8Filter(object.text) - comment.profile_picture = UTF8Filter(object.user.profile_image_url) + comment.profile_picture = object.user.profile_image_url.to_s comment.author_id = author_id comment.name = UTF8Filter(object.user.screen_name) comment.email = 'admin@localhost.local' @@ -62,4 +62,4 @@ def listen_twitter_stream(hub, author_id) break end end -end \ No newline at end of file +end diff --git a/views/community_hub_plugin_public/_mediation.rhtml b/views/community_hub_plugin_public/_mediation.rhtml index bbe740b..b3ae381 100644 --- a/views/community_hub_plugin_public/_mediation.rhtml +++ b/views/community_hub_plugin_public/_mediation.rhtml @@ -7,7 +7,7 @@
  • <% if mediation.source == 'twitter' %> - <%= image_tag('/plugins/community_hub/icons/logo_twitter_bird_white_50x50.png', :alt => "Twitter") %> + <%= image_tag(mediation.external_link, :alt => "Twitter") %> <% elsif mediation.source == 'facebook' %> <%= image_tag('/plugins/community_hub/icons/logo_facebook_50x50.png', :alt => "Facebook") %> <% else %> diff --git a/views/community_hub_plugin_public/_post.rhtml b/views/community_hub_plugin_public/_post.rhtml index 41815da..67de60a 100644 --- a/views/community_hub_plugin_public/_post.rhtml +++ b/views/community_hub_plugin_public/_post.rhtml @@ -5,7 +5,7 @@
  • <%= post_time(post.created_at) %>
  • <% if post.title == 'hub-message-twitter' %> - <%= image_tag('/plugins/community_hub/icons/logo_twitter_bird_white_50x50.png', :alt => "Twitter") %> + <%= image_tag(post.profile_picture, :alt => "Twitter") %> <% elsif post.title == 'hub-message-facebook' %> <%= image_tag('/plugins/community_hub/icons/logo_facebook_50x50.png', :alt => "Facebook") %> <% else %> -- libgit2 0.21.2