Move conversations to SQLCipher
This commit is contained in:
parent
8cd3db0262
commit
cd60bdd08a
31 changed files with 1354 additions and 774 deletions
|
@ -16,7 +16,6 @@ const {
|
|||
|
||||
const Attachments = require('../../app/attachments');
|
||||
const Message = require('./types/message');
|
||||
const { deferredToPromise } = require('./deferred_to_promise');
|
||||
const { sleep } = require('./sleep');
|
||||
|
||||
// See: https://en.wikipedia.org/wiki/Fictitious_telephone_number#North_American_Numbering_Plan
|
||||
|
@ -50,9 +49,12 @@ exports.createConversation = async ({
|
|||
active_at: Date.now(),
|
||||
unread: numMessages,
|
||||
});
|
||||
await deferredToPromise(conversation.save());
|
||||
|
||||
const conversationId = conversation.get('id');
|
||||
await Signal.Data.updateConversation(
|
||||
conversationId,
|
||||
conversation.attributes,
|
||||
{ Conversation: Whisper.Conversation }
|
||||
);
|
||||
|
||||
await Promise.all(
|
||||
range(0, numMessages).map(async index => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue