This commit is contained in:
Jorge Manrubia
2025-05-06 08:01:45 +02:00
parent ea1f39ac6c
commit bdbf1424f1
+8 -8
View File
@@ -21,14 +21,6 @@ class Command::Parser
end
private
def search(string)
if card = user.accessible_cards.find_by_id(string)
Command::GoToCard.new(card_id: card.id)
else
Command::Search.new(query: string)
end
end
def assignees_from(strings)
Array(strings).filter_map do |string|
assignee_from(string)
@@ -41,4 +33,12 @@ class Command::Parser
string_without_at = string.delete_prefix("@")
User.all.find { |user| user.mentionable_handles.include?(string_without_at) }
end
def search(string)
if card = user.accessible_cards.find_by_id(string)
Command::GoToCard.new(card_id: card.id)
else
Command::Search.new(query: string)
end
end
end