diff --git a/web/input/input-state-container.react.js b/web/input/input-state-container.react.js --- a/web/input/input-state-container.react.js +++ b/web/input/input-state-container.react.js @@ -550,7 +550,7 @@ const sidebarCreation = this.pendingSidebarCreationMessageLocalIDs.has(localID); try { - const { result } = await this.props.sendMultimediaMessage( + const { result, mediaIDUpdates } = await this.props.sendMultimediaMessage( messageInfo, sidebarCreation, true, @@ -565,9 +565,15 @@ if (upload.messageID !== localID) { newUploads[localUploadID] = upload; } else if (!upload.uriIsReal) { + const { serverID } = upload; + let newServerID = serverID; + if (serverID && mediaIDUpdates?.[serverID]) { + newServerID = mediaIDUpdates[serverID].id; + } newUploads[localUploadID] = { ...upload, messageID: result.serverID, + serverID: newServerID, }; } }