Skip to content
Snippets Groups Projects
Commit 31390b73 authored by luap42's avatar luap42
Browse files

This should do it.

parent c98cfb8d
Branches
Tags
No related merge requests found
......@@ -6,12 +6,12 @@ class WarningTemplate < ApplicationRecord
def body_as_b64
body_with_site_replacements = body.gsub '$SiteName', SiteSetting['SiteName']
body_with_site_replacements = if SiteSetting['ChatLink'].nil?
body_with_site_replacements.gsub '$ChatLink', 'chat'
chat_link = if SiteSetting['ChatLink'].nil?
'chat'
else
chat_link = '[chat](' + SiteSetting['ChatLink'] + ')'
body_with_site_replacements.gsub '$ChatLink', chat_link
'[chat](' + SiteSetting['ChatLink'] + ')'
end
body_with_site_replacements = body_with_site_replacements.gsub '$ChatLink', chat_link
Base64.encode64(body_with_site_replacements)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment