Sync helpers: add a function to create journal entry from sync entry.

master
Tom Hacohen 5 years ago
parent 28c16ccae5
commit a0da029631

@ -13,9 +13,18 @@ export function createJournalEntry(
const syncEntry = new EteSync.SyncEntry(); const syncEntry = new EteSync.SyncEntry();
syncEntry.action = action; syncEntry.action = action;
syncEntry.content = content; syncEntry.content = content;
return createJournalEntryFromSyncEntry(etesync, userInfo, journal, prevUid, syncEntry);
}
export function createJournalEntryFromSyncEntry(
etesync: CredentialsData,
userInfo: UserInfoData,
journal: EteSync.Journal,
prevUid: string | null,
syncEntry: EteSync.SyncEntry) {
const derived = etesync.encryptionKey; const derived = etesync.encryptionKey;
let cryptoManager: EteSync.CryptoManager; let cryptoManager: EteSync.CryptoManager;

Loading…
Cancel
Save