HomePhabricator
Diffusion Comm 91212c47fdb7

[web] Hide that InputState.sendTextMessage returns a Promise

Description

[web] Hide that InputState.sendTextMessage returns a Promise

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

Reviewers: atul, bartek, michal

Reviewed By: michal

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D10162

Details

Provenance
ashoatAuthored on Dec 2 2023, 12:54 PM
Reviewer
michal
Differential Revision
D10162: [web] Hide that InputState.sendTextMessage returns a Promise
Parents
rCOMM63bd46b9c15c: [lib] Wrap spinPromises in ignorePromiseRejections
Branches
Unknown
Tags
Unknown