Use `SignalService` vs `textsecure` for protobuf

pull/1/head
Daniel Gasienica 7 years ago
parent 6589247750
commit 38f3ad6518

@ -33,9 +33,6 @@
this.on('change:expireTimer', this.setToExpire); this.on('change:expireTimer', this.setToExpire);
this.on('unload', this.unload); this.on('unload', this.unload);
this.setToExpire(); this.setToExpire();
this.VOICE_FLAG =
textsecure.protobuf.AttachmentPointer.Flags.VOICE_MESSAGE;
}, },
idForLogging() { idForLogging() {
return `${this.get('source')}.${this.get('sourceDevice')} ${this.get( return `${this.get('source')}.${this.get('sourceDevice')} ${this.get(
@ -248,8 +245,7 @@
}); });
return Object.assign({}, attachment, { return Object.assign({}, attachment, {
// eslint-disable-next-line no-bitwise isVoiceMessage: Signal.Types.Attachment.isVoiceMessage(attachment),
isVoiceMessage: Boolean(attachment.flags & this.VOICE_FLAG),
thumbnail: thumbnailWithObjectUrl, thumbnail: thumbnailWithObjectUrl,
}); });
}, },

@ -597,7 +597,7 @@ const outgoing = new Whisper.Message({
sent_at: Date.now() - 15000, sent_at: Date.now() - 15000,
attachments: [ attachments: [
{ {
flags: textsecure.protobuf.AttachmentPointer.Flags.VOICE_MESSAGE, flags: SignalService.AttachmentPointer.Flags.VOICE_MESSAGE,
data: util.mp3, data: util.mp3,
fileName: 'agnus_dei.mp3', fileName: 'agnus_dei.mp3',
contentType: 'audio/mp3', contentType: 'audio/mp3',

@ -572,7 +572,7 @@ const outgoing = new Whisper.Message({
attachments: [ attachments: [
{ {
// proposed as of afternoon of 4/6 in Quoted Replies group // proposed as of afternoon of 4/6 in Quoted Replies group
flags: textsecure.protobuf.AttachmentPointer.Flags.VOICE_MESSAGE, flags: SignalService.AttachmentPointer.Flags.VOICE_MESSAGE,
contentType: 'audio/mp3', contentType: 'audio/mp3',
fileName: 'agnus_dei.mp4', fileName: 'agnus_dei.mp4',
}, },

Loading…
Cancel
Save