Page MenuHomePhabricator

[web] Update serverID for pendingUploads after reassignment
ClosedPublic

Authored by bartek on Oct 1 2024, 3:54 AM.
Tags
None
Referenced Files
F3286917: D13556.diff
Sat, Nov 16, 1:33 PM
Unknown Object (File)
Mon, Nov 4, 3:48 PM
Unknown Object (File)
Mon, Nov 4, 1:46 PM
Unknown Object (File)
Fri, Nov 1, 5:06 PM
Unknown Object (File)
Fri, Nov 1, 5:06 PM
Unknown Object (File)
Fri, Nov 1, 5:06 PM
Unknown Object (File)
Fri, Nov 1, 5:06 PM
Unknown Object (File)
Fri, Nov 1, 4:22 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
No Lint Coverage
Unit
No Test Coverage

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