Page MenuHomePhabricator

[native] introduce message searching to `CommCoreModule`
ClosedPublic

Authored by kamil on Jul 23 2024, 3:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Sep 4, 12:42 AM
Unknown Object (File)
Wed, Sep 4, 12:42 AM
Unknown Object (File)
Wed, Sep 4, 12:42 AM
Unknown Object (File)
Wed, Sep 4, 12:42 AM
Unknown Object (File)
Tue, Sep 3, 8:51 AM
Unknown Object (File)
Wed, Aug 28, 2:47 AM
Unknown Object (File)
Mon, Aug 26, 10:55 AM
Unknown Object (File)
Mon, Aug 26, 10:48 AM
Subscribers

Details

Summary

The code on native to interface with search API using JSI.

Depends on D12852

Test Plan

Tested later in the stack by @inka.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Jul 23 2024, 5:04 AM
tomek added inline comments.
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
2700 ↗(On Diff #42673)

In some places, we're using a different syntax auto queryStr{query.utf8(rt)}. Which of them is the good practice?

native/schema/CommCoreModuleSchema.js
177 ↗(On Diff #42673)

T[] syntax is discouraged and might be deprecated in the future https://flow.org/en/docs/types/arrays/#toc-array-type-shorthand-syntax

This revision is now accepted and ready to land.Jul 23 2024, 6:35 AM
native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
2700 ↗(On Diff #42673)

I am not sure, I think it's better to stick to explicit types unless auto really makes sense, e.g. the return type of a function might be changed later with something compatible or when the type is already easily readable from the right side of the assignment. In other cases, I think it decreases readability.

native/schema/CommCoreModuleSchema.js
177 ↗(On Diff #42673)

going to add another diff and fix them all