diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-04-02 14:45:12 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-05-21 03:16:21 -0500 |
commit | d00907014b705a133cab48e3843afe5f4dbf99b4 (patch) | |
tree | 33695a36b3361662e0285092bacc4b4ebeb6b53f | |
parent | dd70b4e463a537011641d6de1b73b04c87018c7d (diff) |
bangtags for cloudroot (monsterpit.cloud/~/you) and blogroot (monsterpit.blog/~/you) links
-rw-r--r-- | app/models/status.rb | 6 |
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 |