message: Solve stale update problem (partly)
diff: var fs = require('fs')
  var request = require('request')
  var colors = require('colors/safe')
  +var models = require('../models')
  var notifications = require('../data/datacache').notifications
  var challenges = require('../data/datacache').challenges
  var packageJson = require('../package.json')
  @@ -88,13 +89,16 @@ exports.ctfFlag = function (text) {
  exports.solve = function (challenge, isRestore) {
  var self = this
  - challenge.updateAttributes({ solved: true }).success(function (challenge) {
  - challenge.description = entities.decode(sanitizeHtml(challenge.description, {
  + challenge.solved = true
  + models.Challenge.find(challenge.id).success(function (foundChallenge) {
  + foundChallenge.updateAttributes({ solved: true }).success(function (solvedChallenge) {
  + solvedChallenge.description = entities.decode(sanitizeHtml(solvedChallenge.description, {
  allowedTags: [],
  allowedAttributes: []
  }))
  - console.log(colors.green('Solved') + ' challenge ' + colors.cyan(challenge.name) + ' (' + challenge.description + ')')
  - self.sendNotification(challenge, isRestore)
  + console.log(colors.green('Solved') + ' challenge ' + colors.cyan(solvedChallenge.name) + ' (' + solvedChallenge.description + ')')
  + self.sendNotification(solvedChallenge, isRestore)
  + })
  })
  }
  