forked from External/greenlight
		
	Updated unified sample.env and setup default values to some variables
This commit is contained in:
		@@ -23,14 +23,15 @@ rescue URI::InvalidURIError
 | 
			
		||||
  false
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
if !ENV['SLACK_WEBHOOK'].nil? && !ENV['SLACK_WEBHOOK'].empty? && uri?(ENV['SLACK_WEBHOOK']) then
 | 
			
		||||
  # Initialize the slack notifier.
 | 
			
		||||
  Rails.application.config.slack_notifier = Slack::Notifier.new ENV['SLACK_WEBHOOK'] do
 | 
			
		||||
    defaults channel: ENV['SLACK_CHANNEL'],
 | 
			
		||||
             username: "BigBlueButton",
 | 
			
		||||
             icon_url: 'https://avatars3.githubusercontent.com/u/230228?v=3&s=200'
 | 
			
		||||
  end
 | 
			
		||||
else
 | 
			
		||||
if !ENV['SLACK_WEBHOOK'] || !ENV['SLACK_CHANNEL'] || !uri?(ENV['SLACK_WEBHOOK']) then
 | 
			
		||||
  # Initialize it to nil (slack not configured)
 | 
			
		||||
  Rails.application.config.slack_notifier = nil
 | 
			
		||||
  return
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
# Initialize the slack notifier.
 | 
			
		||||
Rails.application.config.slack_notifier = Slack::Notifier.new ENV['SLACK_WEBHOOK'] do
 | 
			
		||||
  defaults channel: ENV['SLACK_CHANNEL'],
 | 
			
		||||
           username: "BigBlueButton",
 | 
			
		||||
           icon_url: 'https://avatars3.githubusercontent.com/u/230228?v=3&s=200'
 | 
			
		||||
end
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user