Page MenuHomePhabricator

[web] Update serverID for pendingUploads after reassignment
ClosedPublic

Authored by bartek on Oct 1 2024, 3:54 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 9:46 AM
Unknown Object (File)
Wed, Dec 18, 9:46 AM
Unknown Object (File)
Wed, Dec 18, 9:46 AM
Unknown Object (File)
Wed, Dec 18, 9:46 AM
Unknown Object (File)
Wed, Dec 18, 9:46 AM
Unknown Object (File)
Nov 16 2024, 3:41 PM
Unknown Object (File)
Nov 16 2024, 1:33 PM
Unknown Object (File)
Nov 4 2024, 3:48 PM
Subscribers

Details

Summary
Test Plan

Printed pendingUploads in setState callback. Started thread with a user without CSAT by sending multimedia. Confirmed that upload serverID is updated to a keyserver ID.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Oct 1 2024, 5:48 AM
web/input/input-state-container.react.js
572–581 ↗(On Diff #44745)

Why are we sure that we only need to modify this info in the case of !uriIsReal?

How about native?

I checked native too. Confirmed what I was thinking initially in https://phab.comm.dev/D13501?id=44638#inline-77322:

I haven't found any reason to do it on native though

web/input/input-state-container.react.js
572–581 ↗(On Diff #44745)

If uriIsReal, this code originally skips creating newUploads for this particular upload, effectively removing it from state.
If we send a message while uri is not yet real (media is not yet preloaded), we assign messageID (and now serverID) to it and keep the upload.

I checked it and without this condition, a new invalid pendingUpload is created with only two properties: messageID and serverID.

Thanks for explaining

This revision is now accepted and ready to land.Oct 1 2024, 6:45 AM