Fix image processing for onboarding story
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
parent
126905d384
commit
5fd64d2c99
1 changed files with 8 additions and 4 deletions
|
@ -65,11 +65,11 @@ export async function downloadOnboardingStory(): Promise<void> {
|
||||||
log.info('downloadOnboardingStory: downloaded stories:', imageBuffers.length);
|
log.info('downloadOnboardingStory: downloaded stories:', imageBuffers.length);
|
||||||
|
|
||||||
const attachments: Array<AttachmentType> = await Promise.all(
|
const attachments: Array<AttachmentType> = await Promise.all(
|
||||||
imageBuffers.map(data => {
|
imageBuffers.map(async data => {
|
||||||
|
const local = await window.Signal.Migrations.writeNewAttachmentData(data);
|
||||||
const attachment: AttachmentType = {
|
const attachment: AttachmentType = {
|
||||||
contentType: IMAGE_JPEG,
|
contentType: IMAGE_JPEG,
|
||||||
data,
|
...local,
|
||||||
size: data.byteLength,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return window.Signal.Migrations.processNewAttachment(attachment);
|
return window.Signal.Migrations.processNewAttachment(attachment);
|
||||||
|
@ -100,7 +100,11 @@ export async function downloadOnboardingStory(): Promise<void> {
|
||||||
timestamp,
|
timestamp,
|
||||||
type: 'story',
|
type: 'story',
|
||||||
};
|
};
|
||||||
return new window.Whisper.Message(partialMessage);
|
return window.MessageCache.__DEPRECATED$register(
|
||||||
|
partialMessage.id,
|
||||||
|
partialMessage,
|
||||||
|
'downloadOnboardingStory'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue