mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-22 08:16:09 +08:00
fix(tracking): uid uses draftClientId
This commit is contained in:
parent
8d8227a094
commit
be7a196eeb
|
@ -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.
|
||||
|
|
|
@ -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: [],
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue