Skip to content
Snippets Groups Projects

Feature to create directly addressed Todos when mentioned in beginning

6 files
+ 23
21
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -43,7 +43,7 @@ def local_reference
self
end
def all_references(current_user = nil, reference_options: {}, extractor: nil)
def all_references(current_user = nil, extractor: nil)
# Use custom extractor if it's passed in the function parameters.
if extractor
@extractor = extractor
@@ -54,8 +54,6 @@ def all_references(current_user = nil, reference_options: {}, extractor: nil)
@extractor.reset_memoized_values
end
@extractor.set_reference_options(reference_options)
self.class.mentionable_attrs.each do |attr, options|
text = __send__(attr)
options = options.merge(cache_key: [self, attr], author: author)
@@ -71,8 +69,7 @@ def mentioned_users(current_user = nil)
end
def directly_addressed_users(current_user = nil)
options = { location: :beginning }
all_references(current_user, reference_options: options).users
all_references(current_user).directly_addressed_users
end
# Extract GFM references to other Mentionables from this Mentionable. Always excludes its #local_reference.
Loading