Page MenuHomePhabricator

[web] Hide that InputState.sendTextMessage returns a Promise
ClosedPublic

Authored by ashoat on Dec 4 2023, 1:10 PM.
Tags
None
Referenced Files
F3364988: D10162.diff
Mon, Nov 25, 6:08 AM
Unknown Object (File)
Thu, Nov 7, 8:35 PM
Unknown Object (File)
Oct 16 2024, 10:31 PM
Unknown Object (File)
Oct 16 2024, 10:31 PM
Unknown Object (File)
Oct 16 2024, 10:30 PM
Unknown Object (File)
Oct 16 2024, 10:29 PM
Unknown Object (File)
Oct 15 2024, 11:48 PM
Unknown Object (File)
Sep 7 2024, 1:03 AM
Subscribers

Details

Summary

While working on the unused-promise Flow lint, I noticed that sendTextMessage doesn't actually await the call to sendTextMessageAction. This makes it dangerous to expose as an API to callers, who probably assume the keyserver call is complete when the Promise resolves.

I could make it await here, but since apparently no callsites need a Promise currently, I decided to just make the API return a mixed here for now.

Depends on D10161

Test Plan

Flow

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable