Page MenuHomePhabricator

[lib][native] Review usingOlmViaTunnelbrokerForDMs and pendingThreadType
ClosedPublic

Authored by inka on Fri, Sep 6, 6:07 AM.
Tags
None
Referenced Files
F2709781: D13258.id43922.diff
Sun, Sep 15, 9:31 PM
F2708016: D13258.id43924.diff
Sun, Sep 15, 1:18 PM
F2706759: D13258.id43922.diff
Sun, Sep 15, 9:18 AM
Unknown Object (File)
Sat, Sep 14, 11:39 PM
Unknown Object (File)
Sat, Sep 14, 10:31 PM
Unknown Object (File)
Fri, Sep 13, 3:25 AM
Unknown Object (File)
Thu, Sep 12, 9:38 PM
Unknown Object (File)
Thu, Sep 12, 7:11 PM
Subscribers

Details

Summary

issue: ENG-9146
pendingThreadType should actually return thick or thin types depending on where we call it from.
We want to keep the usingOlmViaTunnelbrokerForDMs flag, so that for now thick threads are not created.

Test Plan

Tested that with the flag set to true thick threads can be created. Checked that with the flag set to false, thin threads are created instead.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lib/shared/thread-actions-utils.js
124 ↗(On Diff #43922)

This is inside threadTypeIsThick(threadInfo.type), so we want the thread type to be thick

139 ↗(On Diff #43922)

This in in an else to threadTypeIsThick(threadInfo.type), so we want this to be thin

lib/shared/thread-utils.js
1244 ↗(On Diff #43922)

This needs to search for both, but that will be handled in ENG-8433. For now keeping the old behaviour

1262 ↗(On Diff #43922)

If the thread doesn't exist, we will want to always create a thick thread. For now we want to keep creating a thin thread, but that is handled by the usingOlmViaTunnelbrokerForDMs flag

native/chat/message-list-container.react.js
162 ↗(On Diff #43922)

Will remove this

173 ↗(On Diff #43922)

This is responsible for displaying some text when creating a chat. Setting this to true breaks the current behaviour, because we need to update some other code as well for this to handle thick threads. Created ENG-9173 to track.

inka requested review of this revision.Fri, Sep 6, 6:25 AM
This revision is now accepted and ready to land.Fri, Sep 6, 7:33 AM
lib/shared/thread-utils.js
682 ↗(On Diff #43924)

Can we use an enum here instead of a boolean to make it more clear what's being specified at the callsite?

It could just be thickOrThin: 'thick' | 'thin', for instance

native/chat/message-list-container.react.js
170 ↗(On Diff #43924)

Is there equivalent code for web?

native/chat/message-list-container.react.js
170 ↗(On Diff #43924)

You are right. We don't display the thread type when creating a chat on native, but we do display breadcrumbs in the top bar. I created ENG-9260 to fix this