fix(tracking): uid uses draftClientId

This commit is contained in:
Evan Morikawa 2016-04-07 12:18:37 -07:00
parent 8d8227a094
commit be7a196eeb
2 changed files with 2 additions and 4 deletions

View file

@ -1,4 +1,3 @@
import uuid from 'node-uuid';
import {
ComposerExtension,
Actions,
@ -23,7 +22,7 @@ export default class LinkTrackingComposerExtension extends ComposerExtension {
if (metadata) {
const draftBody = new DraftBody(draft);
const links = [];
const messageUid = uuid.v4().replace(/-/g, "");
const messageUid = draft.clientId;
// loop through all <a href> elements, replace with redirect links and save
// mappings. The links component of the path is an index of the link array.

View file

@ -2,7 +2,6 @@
import {React, APIError, NylasAPI} from 'nylas-exports'
import {MetadataComposerToggleButton} from 'nylas-component-kit'
import {PLUGIN_ID, PLUGIN_NAME} from './open-tracking-constants'
import uuid from 'node-uuid';
export default class OpenTrackingButton extends React.Component {
static displayName = 'OpenTrackingButton';
@ -25,7 +24,7 @@ export default class OpenTrackingButton extends React.Component {
render() {
const enabledValue = {
uid: uuid.v4().replace(/-/g, ""),
uid: this.props.draftClientId,
open_count: 0,
open_data: [],
};