<commit_before>import _ from 'underscore';

import NylasStore from 'nylas-store';
import { Thread, Actions, DatabaseStore } from 'nylas-exports';

import SalesforceEnv from './salesforce-env';

import SyncThreadActivityToSalesforceTask from './tasks/sync-thread-activity-to-salesforce-task';

import * as mdHelpers from './metadata-helpers'

class SalesforceNewMailListener extends NylasStore {

  activate() {
    this.listenTo(Actions.didPassivelyReceiveCreateDeltas, this._newMailReceived);
    this.listenTo(Actions.draftDeliverySucceeded, this._onSendDraftSuccess);
  }

  deactivate() {
    return this.stopListeningToAll();
  }

  _ensureThreadSynced = (thread) => {
    if (!thread) return;<commit_msg>[local-private] use new action name<commit_after>import _ from 'underscore';

import NylasStore from 'nylas-store';
import { Thread, Actions, DatabaseStore } from 'nylas-exports';

import SalesforceEnv from './salesforce-env';

import SyncThreadActivityToSalesforceTask from './tasks/sync-thread-activity-to-salesforce-task';

import * as mdHelpers from './metadata-helpers'

class SalesforceNewMailListener extends NylasStore {

  activate() {
    this.listenTo(Actions.onNewMailDeltas, this._newMailReceived);
    this.listenTo(Actions.draftDeliverySucceeded, this._onSendDraftSuccess);
  }

  deactivate() {
    return this.stopListeningToAll();
  }

  _ensureThreadSynced = (thread) => {
    if (!thread) return;
{'fraction_non_alphanumeric': 0.11150070126227209, 'fraction_numerical': 0.0, 'mean_word_length': 5.258771929824562, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4945215', 'n_tokens_mistral': 450, 'n_tokens_neox': 434, 'n_words': 89}