Page MenuHomePhabricator

D13365.diff
No OneTemporary

D13365.diff

diff --git a/lib/shared/dm-ops/dm-op-spec.js b/lib/shared/dm-ops/dm-op-spec.js
--- a/lib/shared/dm-ops/dm-op-spec.js
+++ b/lib/shared/dm-ops/dm-op-spec.js
@@ -33,6 +33,9 @@
+isProcessingPossible: false,
+reason:
| { +type: 'missing_thread', +threadID: string }
+ | { +type: 'missing_entry', +entryID: string }
+ | { +type: 'missing_message', +messageID: string }
+ | { +type: 'missing_membership', +threadID: string, +userID: string }
| { +type: 'invalid' },
},
+supportsAutoRetry: boolean,
diff --git a/lib/shared/dm-ops/process-dm-ops.js b/lib/shared/dm-ops/process-dm-ops.js
--- a/lib/shared/dm-ops/process-dm-ops.js
+++ b/lib/shared/dm-ops/process-dm-ops.js
@@ -148,22 +148,43 @@
utilities,
);
if (!processingCheckResult.isProcessingPossible) {
+ if (processingCheckResult.reason.type === 'invalid') {
+ return;
+ }
+ let condition;
if (processingCheckResult.reason.type === 'missing_thread') {
- dispatchWithMetadata(
- {
- type: queueDMOpsActionType,
- payload: {
- operation: dmOp,
- timestamp: Date.now(),
- condition: {
- type: 'thread',
- threadID: processingCheckResult.reason.threadID,
- },
- },
- },
- dispatchMetadata,
- );
+ condition = {
+ type: 'thread',
+ threadID: processingCheckResult.reason.threadID,
+ };
+ } else if (processingCheckResult.reason.type === 'missing_entry') {
+ condition = {
+ type: 'entry',
+ entryID: processingCheckResult.reason.entryID,
+ };
+ } else if (processingCheckResult.reason.type === 'missing_message') {
+ condition = {
+ type: 'message',
+ messageID: processingCheckResult.reason.messageID,
+ };
+ } else if (processingCheckResult.reason.type === 'missing_membership') {
+ condition = {
+ type: 'membership',
+ threadID: processingCheckResult.reason.threadID,
+ userID: processingCheckResult.reason.userID,
+ };
}
+ dispatchWithMetadata(
+ {
+ type: queueDMOpsActionType,
+ payload: {
+ operation: dmOp,
+ timestamp: Date.now(),
+ condition,
+ },
+ },
+ dispatchMetadata,
+ );
return;
}

File Metadata

Mime Type
text/plain
Expires
Fri, Sep 20, 1:06 AM (9 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2124656
Default Alt Text
D13365.diff (2 KB)

Event Timeline