diff --git a/app/lib/Angel.coffee b/app/lib/Angel.coffee index 32aa7b1bb..eaa0d762c 100644 --- a/app/lib/Angel.coffee +++ b/app/lib/Angel.coffee @@ -7,6 +7,8 @@ CocoClass = require 'core/CocoClass' GoalManager = require 'lib/world/GoalManager' {sendContactMessage} = require 'core/contact' +reportedLoadErrorAlready = false + module.exports = class Angel extends CocoClass @nicks: ['Archer', 'Lana', 'Cyril', 'Pam', 'Cheryl', 'Woodhouse', 'Ray', 'Krieger'] @@ -180,6 +182,8 @@ module.exports = class Angel extends CocoClass @fireWorker() reportLoadError: -> + return if me.isAdmin() or /dev=true/.test(window.location?.href ? '') or reportedLoadErrorAlready + reportedLoadErrorAlready = true context = email: me.get('email') context.message = "Automatic Report - Unable to Load Level\nLogs:\n" + @allLogs.join('\n') if $.browser @@ -187,7 +191,7 @@ module.exports = class Angel extends CocoClass context.screenSize = "#{screen?.width ? $(window).width()} x #{screen?.height ? $(window).height()}" context.subject = "Level Load Error: #{@work?.level?.name or 'Unknown Level'}" context.levelSlug = @work?.level?.slug - sendContactMessage context unless me.isAdmin() + sendContactMessage context doWork: -> return if @aborting diff --git a/server/routes/contact.coffee b/server/routes/contact.coffee index b441416e7..d12fd052a 100644 --- a/server/routes/contact.coffee +++ b/server/routes/contact.coffee @@ -66,9 +66,10 @@ createMailContext = (req, done) -> context.email_data.content += "\n" done context - if /Level Load Error/.test context.email_data.subject - message = "#{user.get('name') or user.get('email')} saw #{context.email_data.subject} (level editor)" - hipchat.sendHipChatMessage message, ['tower'], color: 'red' + # I'll try having it just send the emails instead of spamming the chat. + #if /Level Load Error/.test context.email_data.subject + # message = "#{user.get('name') or user.get('email')} saw #{context.email_data.subject} (level editor)" + # hipchat.sendHipChatMessage message, ['tower'], color: 'red' fetchRecentSessions = (user, context, callback) ->