Method: Thredded::AtNotificationExtractor#run
- Defined in:
- app/commands/thredded/at_notification_extractor.rb
#run ⇒ Array<Thredded.user_class>
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/commands/thredded/at_notification_extractor.rb', line 10 def run view_context = Thredded::ApplicationController.new.view_context # Do not highlight @-mentions at first, because: # * When parsing, @-mentions within <a> tags will not be considered. # * We can't always generate the user URL here because request.host is not available. html = @post.filtered_content(view_context, users_provider: nil) Thredded::HtmlPipeline::AtMentionFilter.new( html, view_context: view_context, users_provider: ::Thredded::UsersProvider, users_provider_scope: @post.readers ).mentioned_users end |