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
F1797725: D5059.id16517.diff
Sun, May 19, 11:29 PM
Unknown Object (File)
Sat, May 18, 12:18 PM
Unknown Object (File)
Fri, May 17, 7:59 PM
Unknown Object (File)
Thu, May 16, 5:21 AM
Unknown Object (File)
Tue, May 14, 12:45 PM
Unknown Object (File)
Tue, May 14, 12:45 PM
Unknown Object (File)
Tue, May 14, 12:45 PM
Unknown Object (File)
Tue, May 14, 12:45 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
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

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