Universal Disappearing Messages
This commit is contained in:
parent
c63871d71b
commit
19f8042cd3
50 changed files with 1224 additions and 191 deletions
|
@ -38,6 +38,10 @@ import {
|
|||
getSafeLongFromTimestamp,
|
||||
getTimestampFromLong,
|
||||
} from '../util/timestampLongUtils';
|
||||
import {
|
||||
get as getUniversalExpireTimer,
|
||||
set as setUniversalExpireTimer,
|
||||
} from '../util/universalExpireTimer';
|
||||
import { ourProfileKeyService } from './ourProfileKey';
|
||||
|
||||
const { updateConversation } = dataInterface;
|
||||
|
@ -182,6 +186,11 @@ export async function toAccountRecord(
|
|||
accountRecord.primarySendsSms = Boolean(primarySendsSms);
|
||||
}
|
||||
|
||||
const universalExpireTimer = getUniversalExpireTimer();
|
||||
if (universalExpireTimer) {
|
||||
accountRecord.universalExpireTimer = Number(universalExpireTimer);
|
||||
}
|
||||
|
||||
const PHONE_NUMBER_SHARING_MODE_ENUM =
|
||||
window.textsecure.protobuf.AccountRecord.PhoneNumberSharingMode;
|
||||
const phoneNumberSharingMode = parsePhoneNumberSharingMode(
|
||||
|
@ -811,6 +820,7 @@ export async function mergeAccountRecord(
|
|||
sealedSenderIndicators,
|
||||
typingIndicators,
|
||||
primarySendsSms,
|
||||
universalExpireTimer,
|
||||
} = accountRecord;
|
||||
|
||||
window.storage.put('read-receipt-setting', readReceipts);
|
||||
|
@ -831,6 +841,10 @@ export async function mergeAccountRecord(
|
|||
window.storage.put('primarySendsSms', primarySendsSms);
|
||||
}
|
||||
|
||||
if (typeof universalExpireTimer === 'number') {
|
||||
setUniversalExpireTimer(universalExpireTimer);
|
||||
}
|
||||
|
||||
const PHONE_NUMBER_SHARING_MODE_ENUM =
|
||||
window.textsecure.protobuf.AccountRecord.PhoneNumberSharingMode;
|
||||
let phoneNumberSharingModeToStore: PhoneNumberSharingMode;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue