Page MenuHomePhabricator

[lib][native] Review usingOlmViaTunnelbrokerForDMs and pendingThreadType
ClosedPublic

Authored by inka on Sep 6 2024, 6:07 AM.
Tags
None
Referenced Files
F3517684: D13258.id43922.diff
Sun, Dec 22, 6:05 PM
F3517620: D13258.id44083.diff
Sun, Dec 22, 6:00 PM
F3517441: D13258.id43924.diff
Sun, Dec 22, 5:28 PM
F3517429: D13258.id44092.diff
Sun, Dec 22, 5:21 PM
F3516213: D13258.diff
Sun, Dec 22, 12:50 PM
Unknown Object (File)
Mon, Dec 16, 5:10 AM
Unknown Object (File)
Nov 22 2024, 4:07 PM
Unknown Object (File)
Nov 22 2024, 4:07 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.Sep 6 2024, 6:25 AM
This revision is now accepted and ready to land.Sep 6 2024, 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