about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-04-02 14:45:12 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:21 -0500
commitd00907014b705a133cab48e3843afe5f4dbf99b4 (patch)
tree33695a36b3361662e0285092bacc4b4ebeb6b53f /app/models
parentdd70b4e463a537011641d6de1b73b04c87018c7d (diff)
bangtags for cloudroot (monsterpit.cloud/~/you) and blogroot (monsterpit.blog/~/you) links
Diffstat (limited to 'app/models')
-rw-r--r--app/models/status.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 6a02aa13b..859da01ec 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -572,9 +572,13 @@ class Status < ApplicationRecord
     chunks = []
     text.split(/(#!\w+)/).each do |chunk|
       if chunk.start_with?("#!")
-        case chunk[2..-1]
+        case chunk[2..-1].downcase
         when 'permalink'
           chunks << TagManager.instance.url_for(self)
+        when 'cloudroot'
+          chunks << "https://monsterpit.cloud/~/#{account.username}"
+        when 'blogroot'
+          chunks << "https://monsterpit.blog/~/#{account.username}"
         else
           chunks << chunk
         end