Skip to content

Commit

Permalink
Merge pull request #38149 from Expensify/dsilva_addingIdEmpotencyPara…
Browse files Browse the repository at this point in the history
…mForReconnectApp
  • Loading branch information
blimpich authored Mar 12, 2024
2 parents e94a393 + 96108cf commit 33f707e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/libs/API/parameters/ReconnectAppParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ type ReconnectAppParams = {
mostRecentReportActionLastModified?: string;
updateIDFrom?: number;
policyIDList: string[];
idempotencyKey?: string;
};

export default ReconnectAppParams;
5 changes: 4 additions & 1 deletion src/libs/actions/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,10 @@ function openApp() {
function reconnectApp(updateIDFrom: OnyxEntry<number> = 0) {
console.debug(`[OnyxUpdates] App reconnecting with updateIDFrom: ${updateIDFrom}`);
getPolicyParamsForOpenOrReconnect().then((policyParams) => {
const params: ReconnectAppParams = {...policyParams};
const params: ReconnectAppParams = {
...policyParams,
idempotencyKey: `${WRITE_COMMANDS.RECONNECT_APP}`,
};

// When the app reconnects we do a fast "sync" of the LHN and only return chats that have new messages. We achieve this by sending the most recent reportActionID.
// we have locally. And then only update the user about chats with messages that have occurred after that reportActionID.
Expand Down

0 comments on commit 33f707e

Please sign in to comment.