|
|
@ -1,4 +1,4 @@
|
|
|
|
/* global , Whisper, storage */
|
|
|
|
/* global , Whisper, storage, ConversationController */
|
|
|
|
/* global textsecure: false */
|
|
|
|
/* global textsecure: false */
|
|
|
|
|
|
|
|
|
|
|
|
/* eslint-disable more/no-then */
|
|
|
|
/* eslint-disable more/no-then */
|
|
|
@ -6,12 +6,12 @@
|
|
|
|
// eslint-disable-next-line func-names
|
|
|
|
// eslint-disable-next-line func-names
|
|
|
|
(function() {
|
|
|
|
(function() {
|
|
|
|
'use strict';
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
|
|
window.Whisper = window.Whisper || {};
|
|
|
|
window.Whisper = window.Whisper || {};
|
|
|
|
|
|
|
|
|
|
|
|
const blockedNumbers = new Whisper.BlockedNumberCollection();
|
|
|
|
const blockedNumbers = new Whisper.BlockedNumberCollection();
|
|
|
|
window.getBlockedNumbers = () => blockedNumbers;
|
|
|
|
window.getBlockedNumbers = () => blockedNumbers;
|
|
|
|
|
|
|
|
|
|
|
|
window.BlockedNumberController = {
|
|
|
|
window.BlockedNumberController = {
|
|
|
|
getAll() {
|
|
|
|
getAll() {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -26,7 +26,7 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
load() {
|
|
|
|
load() {
|
|
|
|
window.log.info('BlockedNumberController: starting initial fetch');
|
|
|
|
window.log.info('BlockedNumberController: starting initial fetch');
|
|
|
|
|
|
|
|
|
|
|
|
if (blockedNumbers.length) {
|
|
|
|
if (blockedNumbers.length) {
|
|
|
|
throw new Error('BlockedNumberController: Already loaded!');
|
|
|
|
throw new Error('BlockedNumberController: Already loaded!');
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -82,5 +82,4 @@
|
|
|
|
return storage.isBlocked(number);
|
|
|
|
return storage.isBlocked(number);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})();
|
|
|
|
})();
|
|
|
|
|
|
|
|
|