From d00907014b705a133cab48e3843afe5f4dbf99b4 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Tue, 2 Apr 2019 14:45:12 -0500 Subject: bangtags for cloudroot (monsterpit.cloud/~/you) and blogroot (monsterpit.blog/~/you) links --- app/models/status.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit