about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorHolly 'Frinkel' Lotor <admin@frinkel.tech>2020-01-20 11:54:21 -0500
committerHolly 'Frinkel' Lotor <admin@frinkel.tech>2020-01-20 16:56:53 -0500
commit259f0b15fc10470c00c57d88aec07617b5ee6ece (patch)
tree4a7bc0176181b760cab594a65c388713632cb95d /app
parentb0630ddc8261250c5edbf2907648695041649e98 (diff)
Merge first smoke test
Diffstat (limited to 'app')
-rw-r--r--app/lib/tag_manager.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/lib/tag_manager.rb b/app/lib/tag_manager.rb
index c88cf4994..fbe03e10f 100644
--- a/app/lib/tag_manager.rb
+++ b/app/lib/tag_manager.rb
@@ -36,4 +36,15 @@ class TagManager
 
     TagManager.instance.web_domain?(domain)
   end
+
+  def url_for(target)
+    return target.url if target.respond_to?(:local?) && !target.local?
+
+    case target.object_type
+    when :person
+      short_account_url(target)
+    when :note, :comment, :activity
+      short_account_status_url(target.account, target)
+    end
+  end
 end