Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3381688
D4169.id13262.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4169.id13262.diff
View Options
diff --git a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
--- a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
+++ b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
@@ -310,8 +310,13 @@
for (auto idx = 0; idx < operations.size(rt); idx++) {
auto op = operations.getValueAtIndex(rt, idx).asObject(rt);
auto op_type = op.getProperty(rt, "type").asString(rt).utf8(rt);
- auto payload_obj = op.getProperty(rt, "payload").asObject(rt);
+ if (op_type == REMOVE_ALL_OPERATION) {
+ messageStoreOps.push_back(std::make_unique<RemoveAllMessagesOperation>());
+ continue;
+ }
+
+ auto payload_obj = op.getProperty(rt, "payload").asObject(rt);
if (op_type == REMOVE_OPERATION) {
messageStoreOps.push_back(
std::make_unique<RemoveMessagesOperation>(rt, payload_obj));
@@ -328,9 +333,6 @@
messageStoreOps.push_back(
std::make_unique<RekeyMessageOperation>(rt, payload_obj));
- } else if (op_type == REMOVE_ALL_OPERATION) {
- messageStoreOps.push_back(std::make_unique<RemoveAllMessagesOperation>());
-
} else {
throw std::runtime_error("unsupported operation: " + op_type);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 5:52 AM (21 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596053
Default Alt Text
D4169.id13262.diff (1 KB)
Attached To
Mode
D4169: [native] Fix `CommCoreModule:createMessageStoreOperations` for REMOVE_ALL_OPERATION
Attached
Detach File
Event Timeline
Log In to Comment