Adding hashtags
This commit is contained in:
parent
62292797ec
commit
48b9619439
33 changed files with 305 additions and 62 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue