Skip to content

Commit 6ae0284

Browse files
committed
fix: display fileId in messageInfo
1 parent 2f7b64d commit 6ae0284

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ts/components/conversation/right-panel/overlay/message-info/OverlayMessageInfo.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,12 @@ async function getPropsForMessageInfo(
117117
const found = await Data.getMessageById(messageId);
118118
const attachmentsWithMediaDetails: Array<PropsForAttachment> = [];
119119
if (found) {
120+
const attachmentsInMsg = found.get('attachments') || [];
121+
120122
// process attachments so we have the fileSize, url and screenshots
121123
for (let i = 0; i < attachments.length; i++) {
122124
const props = found.getPropsForAttachment(attachments[i]);
125+
const fsUrl = attachmentsInMsg?.[i].url;
123126
if (
124127
props?.contentType &&
125128
GoogleChrome.isVideoTypeSupported(props?.contentType) &&
@@ -134,6 +137,7 @@ async function getPropsForMessageInfo(
134137
attachmentsWithMediaDetails.push({
135138
...props,
136139
duration,
140+
url: fsUrl,
137141
});
138142
} else if (props?.contentType && isAudio(props.contentType) && !props.duration && props.url) {
139143
// eslint-disable-next-line no-await-in-loop
@@ -145,9 +149,10 @@ async function getPropsForMessageInfo(
145149
attachmentsWithMediaDetails.push({
146150
...props,
147151
duration,
152+
url: fsUrl,
148153
});
149154
} else if (props) {
150-
attachmentsWithMediaDetails.push(props);
155+
attachmentsWithMediaDetails.push({ ...props, url: fsUrl });
151156
}
152157
}
153158

0 commit comments

Comments
 (0)