Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2756709
D13365.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D13365.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D13365: [lib] Queue operations
Attached
Detach File
Event Timeline
Log In to Comment