Page MenuHomePhabricator

[lib] Rename `sendMultimediaMessage` => `legacySendMultimediaMessage` in `message-actions.js`
ClosedPublic

Authored by atul on Sep 5 2022, 8:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 4, 6:39 PM
Unknown Object (File)
Wed, Dec 4, 6:38 PM
Unknown Object (File)
Wed, Dec 4, 6:36 PM
Unknown Object (File)
Wed, Dec 4, 5:56 PM
Unknown Object (File)
Wed, Dec 4, 11:20 AM
Unknown Object (File)
Fri, Nov 29, 6:49 AM
Unknown Object (File)
Mon, Nov 25, 3:46 PM
Unknown Object (File)
Mon, Nov 25, 1:13 PM
Subscribers

Details

Summary

This is just a simple rename.

Why are we doing this?

We've modified multimediaMessageCreationResponder in the last diff (D5058) to accept a t.list(tMediaMessageMedia) while continuing to support t.list(t.String) (via legacyMultimediaMessageCreationResponder).

We needed to make this change so the client could communicate to the keyserver the relationship between each piece of media (photo or video) and corresponding uploads for video messages.

We want to update native to use the updated payload when hitting the create_multimedia_message endpoint. However, we don't want to break web while we're doing that.

So, we're keeping the existing sendMultimediaMessage around and renaming to legacy... so everything continues to work. Then

  1. Introducing a new version of sendMultimediaMessage to be consumed by native that sends over the new payload
  2. Implementing "new" multimediaMessageCreationResponder to handle the new payload

3-?: Making whatever changes on native needed to get video messages working end-to-end
?+1: Updating input-state-container on web to use the new sendMultimediaMessage
?+2: Removing legacySendMultimediaMessage altogether

Basically this lets us defer updating input-state-container on web while we're figuring things out on native.


Depends on D5058

Test Plan
  1. Able to send/recieve photo(s) on native as expected
  2. Able to send/recieve photo(s) on web as expected

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested review of this revision.Sep 5 2022, 8:54 PM

Thanks for the explanation. My first thought was that clients should start using the new API immediately, but I do agree that postponing it for web could simplify it.

This revision is now accepted and ready to land.Sep 8 2022, 8:04 AM