Use Attachment.isVoiceMessage
This commit is contained in:
parent
5789b3eb75
commit
a86056630f
2 changed files with 2 additions and 15 deletions
|
@ -179,4 +179,5 @@ exports.deleteData = deleteAttachmentData => {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.isVoiceMessage = AttachmentTS.isVoiceMessage;
|
||||||
exports.save = AttachmentTS.save;
|
exports.save = AttachmentTS.save;
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
/* global i18n: false */
|
/* global i18n: false */
|
||||||
/* global Signal: false */
|
/* global Signal: false */
|
||||||
/* global textsecure: false */
|
|
||||||
/* global Whisper: false */
|
/* global Whisper: false */
|
||||||
|
|
||||||
// eslint-disable-next-line func-names
|
// eslint-disable-next-line func-names
|
||||||
|
@ -119,20 +118,7 @@
|
||||||
Signal.Backbone.Views.Lightbox.show(this.lightboxView.el);
|
Signal.Backbone.Views.Lightbox.show(this.lightboxView.el);
|
||||||
},
|
},
|
||||||
isVoiceMessage() {
|
isVoiceMessage() {
|
||||||
if (
|
return Signal.Types.Attachment.isVoiceMessage(this.model);
|
||||||
// eslint-disable-next-line no-bitwise
|
|
||||||
this.model.flags &
|
|
||||||
textsecure.protobuf.AttachmentPointer.Flags.VOICE_MESSAGE
|
|
||||||
) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Support for android legacy voice messages
|
|
||||||
if (this.isAudio() && this.model.fileName === null) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
isAudio() {
|
isAudio() {
|
||||||
const { contentType } = this.model;
|
const { contentType } = this.model;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue