Key emoji for statuses

This commit is contained in:
2024-03-10 22:10:12 +11:00
parent 1746ce8bb4
commit 1712d634e5
7 changed files with 30 additions and 9 deletions

View File

@@ -11,9 +11,11 @@ module Main
module Statuses
class Decorator < Main::Decorators::Posts::Decorator
def raw_content
Sanitize.fragment(content,
res = Sanitize.fragment(content,
elements: ["img", "p"],
attributes: {"img" => ["alt", "src", "title"]})
res.gsub(prefix_emoji[0], "") if prefix_emoji
end
end
end