Merge pull request #2458 from Bilb/fix-add-voice-message-flag

fix: set flags to VOICE_MESSAGE when sending attachment with voice msg
pull/2479/head
Audric Ackermann 3 years ago committed by GitHub
commit 2e2dac6c08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -830,6 +830,12 @@ export class MessageModel extends Backbone.Model<MessageAttributes> {
fileIdsToLink.push(firstQuoteAttachmentId);
}
}
const isFirstAttachmentVoiceMessage = finalAttachments?.[0]?.isVoiceMessage;
if (isFirstAttachmentVoiceMessage) {
attachments[0].flags = SignalService.AttachmentPointer.Flags.VOICE_MESSAGE;
}
window.log.info(`Upload of message data for message ${this.idForLogging()} is finished.`);
return {
body,

@ -36,6 +36,7 @@ function overwriteOutgoingTimestampWithNetworkTimestamp(message: RawMessage) {
const { plainTextBuffer } = message;
const contentDecoded = SignalService.Content.decode(plainTextBuffer);
const { dataMessage, dataExtractionNotification, typingMessage } = contentDecoded;
if (dataMessage && dataMessage.timestamp && dataMessage.timestamp > 0) {
// this is a sync message, do not overwrite the message timestamp

@ -332,8 +332,6 @@ export async function getFileAndStoreLocally(
screenshot: attachmentSavedLocally.screenshot,
thumbnail: attachmentSavedLocally.thumbnail,
size: attachmentSavedLocally.size,
// url: undefined,
flags: attachmentFlags || undefined,
};
}

Loading…
Cancel
Save