about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-05 15:20:05 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-05 17:13:14 +0100
commit48b9619439818ecb344ae33c9c31a55ecb1aa27a (patch)
treeef350e3ebf2563adbe4d57778a08f561d912415f /app/lib
parent62292797eccc5bcf47abae9f4daaa2c186660644 (diff)
Adding hashtags
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/feed_manager.rb4
-rw-r--r--app/lib/formatter.rb3
2 files changed, 4 insertions, 3 deletions
diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb
index 0b04ad7ff..86f41cfe9 100644
--- a/app/lib/feed_manager.rb
+++ b/app/lib/feed_manager.rb
@@ -23,8 +23,8 @@ class FeedManager
     broadcast(account.id, type: 'update', timeline: timeline_type, message: inline_render(account, status))
   end
 
-  def broadcast(account_id, options = {})
-    ActionCable.server.broadcast("timeline:#{account_id}", options)
+  def broadcast(timeline_id, options = {})
+    ActionCable.server.broadcast("timeline:#{timeline_id}", options)
   end
 
   def trim(type, account_id)
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb
index d8d5424fd..1ec77e56d 100644
--- a/app/lib/formatter.rb
+++ b/app/lib/formatter.rb
@@ -2,6 +2,7 @@ require 'singleton'
 
 class Formatter
   include Singleton
+  include RoutingHelper
 
   include ActionView::Helpers::TextHelper
   include ActionView::Helpers::SanitizeHelper
@@ -52,7 +53,7 @@ class Formatter
 
   def hashtag_html(match)
     prefix, affix = match.split('#')
-    "#{prefix}<a href=\"#\" class=\"mention hashtag\">#<span>#{affix}</span></a>"
+    "#{prefix}<a href=\"#{tag_url(affix.downcase)}\" class=\"mention hashtag\">#<span>#{affix}</span></a>"
   end
 
   def mention_html(match, account)