<commit_before>Meteor.startup ->
  Meteor.methods

    changeEmail: (userId, email) ->
      Meteor.users.update(userId, {
        $set: {
          'emails': [address: email]
        }
      })

    changeUsername: (userId, username) ->
      Meteor.users.update(userId, {
        $set: {
          'username': username
        }
      })

    notifyOffer: (offerId, isEdit) ->
      offer = Offers.findOne(offerId)
      owner = Meteor.users.findOne(offer.needOwnerId)
      email = owner.emails[0].address
      url = 'http://support.unpolishedcr.io/need/' + offer.needId
      text = "Hello,\n\n" +
        offer.email + ' has ' + if isEdit then 'edited their response to your need.\n\n' else 'responded to your need.\n\n' +
        '---------------\n' +
        offer.content + "\n" +
        '---------------\n\n' +
        "To view the need, click the link below.\n\n" +
        url + "\n\n" +
        "Thanks!\n\n" +
        "Supporter.io\n\n"

      Email.send
        to: email
        from: "Supporter.io <<EMAIL>>"
        text: text
        subject: 'Response to your need'<commit_msg>fix email url from .io to .com<commit_after>Meteor.startup ->
  Meteor.methods

    changeEmail: (userId, email) ->
      Meteor.users.update(userId, {
        $set: {
          'emails': [address: email]
        }
      })

    changeUsername: (userId, username) ->
      Meteor.users.update(userId, {
        $set: {
          'username': username
        }
      })

    notifyOffer: (offerId, isEdit) ->
      offer = Offers.findOne(offerId)
      owner = Meteor.users.findOne(offer.needOwnerId)
      email = owner.emails[0].address
      url = 'http://support.unpolishedcr.com/need/' + offer.needId
      text = "Hello,\n\n" +
        offer.email + ' has ' + if isEdit then 'edited their response to your need.\n\n' else 'responded to your need.\n\n' +
        '---------------\n' +
        offer.content + "\n" +
        '---------------\n\n' +
        "To view the need, click the link below.\n\n" +
        url + "\n\n" +
        "Thanks!\n\n" +
        "Supporter.io\n\n"

      Email.send
        to: email
        from: "Supporter.io <<EMAIL>>"
        text: text
        subject: 'Response to your need'
{'fraction_non_alphanumeric': 0.17163504968383017, 'fraction_numerical': 0.0009033423667570009, 'mean_word_length': 1.65906362545018, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '474191', 'n_tokens_mistral': 741, 'n_tokens_neox': 722, 'n_words': 157}