diff --git a/lib/reducers/entry-reducer.js b/lib/reducers/entry-reducer.js --- a/lib/reducers/entry-reducer.js +++ b/lib/reducers/entry-reducer.js @@ -75,6 +75,7 @@ import { dateString } from '../utils/date-utils.js'; import { values } from '../utils/objects.js'; import { sanitizeActionSecrets } from '../utils/sanitization.js'; +import { getUUID } from '../utils/uuid.js'; function daysToEntriesFromEntryInfos( entryInfos: $ReadOnlyArray, @@ -698,6 +699,7 @@ pushResult: afterStateCheck, lastActions: actionLogger.interestingActionSummaries, time: Date.now(), + id: getUUID(), }, ]; } diff --git a/lib/reducers/thread-reducer.js b/lib/reducers/thread-reducer.js --- a/lib/reducers/thread-reducer.js +++ b/lib/reducers/thread-reducer.js @@ -52,6 +52,7 @@ import { setNewSessionActionType } from '../utils/action-utils.js'; import { getConfig } from '../utils/config.js'; import { sanitizeActionSecrets } from '../utils/sanitization.js'; +import { getUUID } from '../utils/uuid.js'; function generateOpsForThreadUpdates( threadInfos: { +[id: string]: RawThreadInfo }, @@ -145,6 +146,7 @@ pushResult: afterStateCheck, lastActions: actionLogger.interestingActionSummaries, time: Date.now(), + id: getUUID(), }, ]; } diff --git a/lib/reducers/user-reducer.js b/lib/reducers/user-reducer.js --- a/lib/reducers/user-reducer.js +++ b/lib/reducers/user-reducer.js @@ -40,6 +40,7 @@ import { setNewSessionActionType } from '../utils/action-utils.js'; import { getConfig } from '../utils/config.js'; import { sanitizeActionSecrets } from '../utils/sanitization.js'; +import { getUUID } from '../utils/uuid.js'; function reduceCurrentUserInfo( state: ?CurrentUserInfo, @@ -141,6 +142,7 @@ afterStateCheck, lastActions: actionLogger.interestingActionSummaries, time: Date.now(), + id: getUUID(), }, ]; } diff --git a/lib/shared/report-utils.js b/lib/shared/report-utils.js --- a/lib/shared/report-utils.js +++ b/lib/shared/report-utils.js @@ -10,6 +10,7 @@ type ClientInconsistencyResponse, serverRequestTypes, } from '../types/request-types.js'; +import { getUUID } from '../utils/uuid.js'; function inconsistencyResponsesToReports( responses: $ReadOnlyArray, @@ -19,10 +20,10 @@ return responses.map(response => { if (response.type === serverRequestTypes.THREAD_INCONSISTENCY) { const { type, ...rest } = response; - return { ...rest, type: reportTypes.THREAD_INCONSISTENCY }; + return { ...rest, type: reportTypes.THREAD_INCONSISTENCY, id: getUUID() }; } else if (response.type === serverRequestTypes.ENTRY_INCONSISTENCY) { const { type, ...rest } = response; - return { ...rest, type: reportTypes.ENTRY_INCONSISTENCY }; + return { ...rest, type: reportTypes.ENTRY_INCONSISTENCY, id: getUUID() }; } else { invariant(false, `unexpected serverRequestType ${response.type}`); } diff --git a/native/crash.react.js b/native/crash.react.js --- a/native/crash.react.js +++ b/native/crash.react.js @@ -40,6 +40,7 @@ type ReduxCrashReport, } from 'lib/utils/sanitization.js'; import sleep from 'lib/utils/sleep.js'; +import { getUUID } from 'lib/utils/uuid.js'; import Button from './components/button.react.js'; import ConnectedStatusBar from './connected-status-bar.react.js'; @@ -172,6 +173,7 @@ componentStack: data.info && data.info.componentStack, })), ...sanitizedReduxReport, + id: getUUID(), }); this.setState({ errorReportID: result.id, diff --git a/native/input/input-state-container.react.js b/native/input/input-state-container.react.js --- a/native/input/input-state-container.react.js +++ b/native/input/input-state-container.react.js @@ -100,6 +100,7 @@ import { getMessageForException, cloneError } from 'lib/utils/errors.js'; import { values } from 'lib/utils/objects.js'; import { useIsReportEnabled } from 'lib/utils/report-utils.js'; +import { getUUID } from 'lib/utils/uuid.js'; import { type EditInputBarMessageParameters, @@ -1391,6 +1392,7 @@ uploadServerID: ids.serverID, uploadLocalID: ids.localID, messageLocalID: ids.localMessageID, + id: getUUID(), }; this.props.dispatch({ type: queueReportsActionType, diff --git a/native/media/save-media.js b/native/media/save-media.js --- a/native/media/save-media.js +++ b/native/media/save-media.js @@ -23,6 +23,7 @@ import { getMessageForException } from 'lib/utils/errors.js'; import { promiseAll } from 'lib/utils/promises.js'; import { useIsReportEnabled } from 'lib/utils/report-utils.js'; +import { getUUID } from 'lib/utils/uuid.js'; import { fetchBlob } from './blob-utils.js'; import { @@ -110,6 +111,7 @@ uploadLocalID: uploadIDIsLocal ? uploadID : undefined, messageServerID, messageLocalID, + id: getUUID(), }; dispatch({ type: queueReportsActionType, diff --git a/web/input/input-state-container.react.js b/web/input/input-state-container.react.js --- a/web/input/input-state-container.react.js +++ b/web/input/input-state-container.react.js @@ -96,6 +96,7 @@ import type { CallServerEndpointOptions } from 'lib/utils/call-server-endpoint.js'; import { getConfig } from 'lib/utils/config.js'; import { getMessageForException, cloneError } from 'lib/utils/errors.js'; +import { getUUID } from 'lib/utils/uuid.js'; import { type PendingMultimediaUpload, @@ -1248,6 +1249,7 @@ uploadServerID, uploadLocalID, messageLocalID, + id: getUUID(), }), ); this.props.dispatch({ type: queueReportsActionType, payload: { reports } });