diff --git a/.gitignore b/.gitignore index 43b3c5e9d5..a9c1554bde 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ proxy.key proxy.pub *.tsbuildinfo +yarn-error.log diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 0000000000..31354ec138 --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000000..3fb47d4c0a --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,3 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + diff --git a/.prettierrc.js b/.prettierrc.js index a425d3f761..600afb3bfa 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,4 +1,6 @@ module.exports = { singleQuote: true, trailingComma: 'es5', + bracketSpacing: true, + arrowParens: 'avoid', }; diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 9a92b58d54..0000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "node", - "request": "launch", - "name": "Mocha Tests", - "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", - "args": [ - "--recursive", - "--exit", - "test/app", - "test/modules", - "ts/test", - "libloki/test/node" - ], - "internalConsoleOptions": "openOnSessionStart" - }, - { - "type": "node", - "request": "launch", - "name": "Launch node Program", - "program": "${file}" - }, - { - "type": "node", - "request": "launch", - "name": "Launch Program", - "program": "${file}" - }, - { - "name": "Python: Current File", - "type": "python", - "request": "launch", - "program": "${file}" - }, - { - "name": "Debug Main Process", - "type": "node", - "request": "launch", - "env": { - "NODE_APP_INSTANCE": "1" - }, - "cwd": "${workspaceRoot}", - "console": "integratedTerminal", - "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron", - "windows": { - "runtimeExecutable": "${workspaceRoot}/node_modules/.bin/electron.cmd" - }, - "args": ["."], - "sourceMaps": true, - "outputCapture": "std" - } - ] -} diff --git a/AUDRICTOCLEAN.txt b/AUDRICTOCLEAN.txt index 115d0d3589..be9550220b 100644 --- a/AUDRICTOCLEAN.txt +++ b/AUDRICTOCLEAN.txt @@ -11,7 +11,7 @@ remove from db * 'signedPreKeys' * senderkeys - +getContact() remove what is is Storage / user.js remove on the UI ts files the calls to conversationModel. everything should be on the props conversationModel @@ -24,6 +24,19 @@ getRecipients() does not make asny sense right ReadSyncs SyncMessage sendSyncMessage needs to be rewritten -sendSyncMessageOnly to fix +sendSyncMessageOnly to fix + + +indexedDB +initializeAttachmentMetadata=> +schemaVersion for messages to put as what needs to be set +run_migration + +### Bug fixes on update of models +* quote of attachment does not share preview +* setting disappearing timer for isMe does not trigger the message +* expiration timer set from user1 second device is not synced to his other devices for a private chat +* add a way for users to know when the messageQueue is reconnected (loading bar or something) +* handled better reconnection \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index 557e0085b3..9f396ff45a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -75,18 +75,14 @@ module.exports = grunt => { src: [ 'libtextsecure/errors.js', 'libtextsecure/libsignal-protocol.js', - 'libtextsecure/protocol_wrapper.js', - 'libtextsecure/crypto.js', 'libtextsecure/storage.js', 'libtextsecure/storage/user.js', 'libtextsecure/storage/groups.js', - 'libtextsecure/storage/unprocessed.js', 'libtextsecure/protobufs.js', 'libtextsecure/helpers.js', 'libtextsecure/stringview.js', 'libtextsecure/event_target.js', - 'libtextsecure/account_manager.js', 'libtextsecure/http-resources.js', 'libtextsecure/message_receiver.js', 'libtextsecure/task_with_timeout.js', diff --git a/LOKI-NOTES.md b/LOKI-NOTES.md deleted file mode 100644 index 18d4aefad7..0000000000 --- a/LOKI-NOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -# Create fake contacts - -Run `window.getAccountManager().addMockContact()` in the debugger console. This will print the fake contact public key. -Behind the scenes, this also emulates that we're already received the contact's prekeys by generating them and saving them in our db. -Copy/paste that public key in the search bar to start chatting. -The messages should have a "v" tick to mark that the message was correctly sent (you need to run the httpserver from /mockup_servers) diff --git a/README.md b/README.md index cb38a2c1ce..101e62457b 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,10 @@ Please search for any [existing issues](https://github.com/loki-project/session- Build instructions can be found in [BUILDING.md](BUILDING.md). +## Debian repository + +Please visit https://deb.oxen.io/
+ ## License Copyright 2011 Whisper Systems
diff --git a/_locales/ar/messages.json b/_locales/ar/messages.json index 050c860049..8e98f44605 100644 --- a/_locales/ar/messages.json +++ b/_locales/ar/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "أرسل على كل حال", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "رقم الآمان الخاص بك مع $name$ قد تغير وغير متحقق منه. انقر للعرض.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/bg/messages.json b/_locales/bg/messages.json index 5236ce1894..00a88f4f8a 100644 --- a/_locales/bg/messages.json +++ b/_locales/bg/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Изпрати все пак", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Вашият номер за сигурност с $name$ е променен и все още не е потвърден. Натиснете за преглед.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/ca/messages.json b/_locales/ca/messages.json index 0cf8e26708..964efb23e3 100644 --- a/_locales/ca/messages.json +++ b/_locales/ca/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Tot i així, envia'l", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "El número de seguretat amb $name$ ha canviat i ja no està verificat. Feu clic per veure'l.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/cs/messages.json b/_locales/cs/messages.json index 1f60359edd..791dcce603 100644 --- a/_locales/cs/messages.json +++ b/_locales/cs/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Přesto poslat", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Bezpečnostní číslo $name$ bylo změněno a nebylo ověřeno. Klikněte pro zobrazení.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/da/messages.json b/_locales/da/messages.json index 1f291d88e7..be1bc62f46 100644 --- a/_locales/da/messages.json +++ b/_locales/da/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Send alligevel", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Dit sikkerhedsnummer med $name$ har ændret sig og er ikke længere verificeret. Klik for at vise.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/de/messages.json b/_locales/de/messages.json index cc088f205a..04982e3156 100644 --- a/_locales/de/messages.json +++ b/_locales/de/messages.json @@ -324,10 +324,6 @@ } } }, - "sendAnyway": { - "message": "Trotzdem senden", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Deine Sicherheitsnummer mit $name$ hat sich geändert und ist nicht mehr verifiziert. Zum Anzeigen anklicken.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", @@ -512,7 +508,7 @@ "welcomeToYourSession": { "message": "Willkommen bei Session" }, - "generateSessionID": { + "createSessionID": { "message": "Session ID erstellen" }, "yourUniqueSessionID": { @@ -1414,9 +1410,6 @@ "enterDisplayName": { "message": "Geben Sie einen Anzeigenamen ein" }, - "enterSessionIDHere": { - "message": "Geben Sie Ihre Session ID ein." - }, "continueYourSession": { "message": "Ihre Session fortsetzen" }, diff --git a/_locales/el/messages.json b/_locales/el/messages.json index 26b3f003bf..ee5be6d430 100644 --- a/_locales/el/messages.json +++ b/_locales/el/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Αποστολή παρ'όλα αυτά", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Ο αριθμός ασφαλείας σας με τον/την $name$ έχει αλλάξει και δεν είναι πλέον επιβεβαιωμένος. Κάντε κλικ για εμφάνιση.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/en/messages.json b/_locales/en/messages.json index d008c88737..37eec6bf81 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -414,10 +414,6 @@ }, "androidKey": "WebRtcCallScreen_you_may_wish_to_verify_this_contact" }, - "sendAnyway": { - "message": "Send Anyway", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Your safety number with $name$ has changed and is no longer verified. Click to show.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", @@ -1251,10 +1247,6 @@ "message": "MMM D", "description": "Timestamp format string for displaying month and day (but not the year) of a date within the current year, ex: use 'MMM D' for 'Aug 8', or 'D MMM' for '8 Aug'." }, - "messageBodyTooLong": { - "message": "Message body is too long.", - "description": "Shown if the user tries to send more than MAX_MESSAGE_BODY_LENGTH chars" - }, "messageBodyMissing": { "message": "Please enter a message body.", "description": "Shown if the user tries to send an empty message (and no attachments)" @@ -2016,7 +2008,7 @@ "getStarted": { "message": "Get started" }, - "generateSessionID": { + "createSessionID": { "message": "Create Session ID", "androidKey": "activity_landing_register_button_title" }, @@ -2058,10 +2050,6 @@ "devicePairingHeader_Step4": { "message": "Enter your Session ID below to link this device to your Session ID." }, - "enterSessionIDHere": { - "message": "Enter your Session ID", - "androidKey": "fragment_enter_session_id_edit_text_hint" - }, "continueYourSession": { "message": "Continue Your Session", "androidKey": "activity_landing_restore_button_title" diff --git a/_locales/eo/messages.json b/_locales/eo/messages.json index 01f5ea24a1..a8682b5965 100644 --- a/_locales/eo/messages.json +++ b/_locales/eo/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Tamen sendi", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Via sekuriga numero kun $name$ ŝanĝiĝis kaj ne plu estas konfirmita. Alklaku por montri ĝin.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/es/messages.json b/_locales/es/messages.json index ed3dcafd87..bf24c35015 100644 --- a/_locales/es/messages.json +++ b/_locales/es/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Enviar de todos modos", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Las cifras de seguridad con $name$ han cambiado y ya no están verificadas. Haz clic para mostrar.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", @@ -1312,7 +1308,7 @@ "allUsersAreRandomly...": { "message": "Tu ID de Session es la dirección única que las personas pueden usar para contactarte en Session. Por diseño, tu ID de Session es totalmente anónima y privada, sin vínculo con tu identidad real." }, - "generateSessionID": { + "createSessionID": { "message": "Crear ID de Session" }, "recoveryPhrase": { @@ -1324,9 +1320,6 @@ "enterDisplayName": { "message": "Ingresa un nombre para mostrar" }, - "enterSessionIDHere": { - "message": "Ingresa tu ID de Session" - }, "continueYourSession": { "message": "Continúa tu Session" }, diff --git a/_locales/es_419/messages.json b/_locales/es_419/messages.json index 617750ddf3..36ced7177d 100644 --- a/_locales/es_419/messages.json +++ b/_locales/es_419/messages.json @@ -303,10 +303,6 @@ } } }, - "sendAnyway": { - "message": "Enviar de Cualquier Forma", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Tu número de seguridad con $name$ ha cambiado y ya no está verificado. Presiona para mostrar.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/et/messages.json b/_locales/et/messages.json index 67e1cb454a..cfaa009622 100644 --- a/_locales/et/messages.json +++ b/_locales/et/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Saada ikkagi", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Sinu turvanumber kasutajaga $name$ on muutunud ja ei ole enam kinnitatud. Klõpsa nägemiseks.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/fa/messages.json b/_locales/fa/messages.json index d97f7dd911..623abcff56 100644 --- a/_locales/fa/messages.json +++ b/_locales/fa/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "به هر حال بفرست", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "کد امنیتی $name$ تغییر کرده و دیگر تأییدشده نیست. برای نمایشش کلیک کنید.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/fi/messages.json b/_locales/fi/messages.json index 7e894b2c73..ad79daccf0 100644 --- a/_locales/fi/messages.json +++ b/_locales/fi/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Lähetä joka tapauksessa", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Turvanumerosi yhteystiedon $name$ kanssa on vaihtunut eikä se ole enää varmennettu. Näytä napsauttamalla.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json index 1b68565bec..f12bb793db 100644 --- a/_locales/fr/messages.json +++ b/_locales/fr/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Envoyer quand même", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Votre numéro de sécurité avec $name$ a changé et n’est plus vérifié. Cliquez pour l’afficher.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", @@ -1312,7 +1308,7 @@ "allUsersAreRandomly...": { "message": "Votre Session ID est l'identifiant unique que les gens utilisent pour vous contacter dans Session. Sans lien avec votre identité réelle, votre Session ID est complètement anonyme et privé." }, - "generateSessionID": { + "createSessionID": { "message": "Créer un Session ID" }, "recoveryPhrase": { @@ -1324,9 +1320,6 @@ "enterDisplayName": { "message": "Saisissez un nom d'utilisateur" }, - "enterSessionIDHere": { - "message": "Saisissez votre Session ID" - }, "continueYourSession": { "message": "Continuez votre Session" }, @@ -1519,10 +1512,6 @@ "message": "Votre horloge est désynchronisée. Merci de mettre à jour votre horloge et de réessayer.", "description": "Notifcation that user's clock is out of sync with Loki's servers." }, - "messageBodyTooLong": { - "message": "Corps de message trop long.", - "description": "Shown if the user tries to send more than 64kb of text" - }, "changeNickname": { "message": "Changer le surnom", "description": "Conversation menu option to change user nickname" diff --git a/_locales/he/messages.json b/_locales/he/messages.json index 13c7b4d3f0..51dedea197 100644 --- a/_locales/he/messages.json +++ b/_locales/he/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "שלח בכל זאת", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "מספר הבטיחות שלך עם $name$ השתנה ואינו מוֻדא יותר. לחץ כדי לראות.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/hi/messages.json b/_locales/hi/messages.json index 29e3c80f9d..65b20acf10 100644 --- a/_locales/hi/messages.json +++ b/_locales/hi/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "वैसे भी भेजें", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "आपकी सुरक्षा संख्या के साथ$name$बदल गया है और अब सत्यापित नहीं है। दिखने के लिए क्लिक करें।", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/hr/messages.json b/_locales/hr/messages.json index 0f14bf506b..c4e787923f 100644 --- a/_locales/hr/messages.json +++ b/_locales/hr/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Svejedno pošalji", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Sigurnosni se broj s $name$ promijenio i više nije potvrđen. Kliknite za prikaz. ", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/hu/messages.json b/_locales/hu/messages.json index 1dbbeac275..8ee8cb30c4 100644 --- a/_locales/hu/messages.json +++ b/_locales/hu/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Küldés ennek ellenére", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Biztonsági számod $name$ nevű partnereddel megváltozott, ezért már nincs hitelesítve. Kattints a megjelenítéshez!", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/id/messages.json b/_locales/id/messages.json index 25c533fad1..ad190ae564 100644 --- a/_locales/id/messages.json +++ b/_locales/id/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Kirimkan Saja", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Nomor keamanan Anda dengan $name$ telah berubah dan tidak lagi diverifikasi. Klik untuk menampilkan.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", @@ -1306,7 +1302,7 @@ "allUsersAreRandomly...": { "message": "Session ID adalah alamat unik yang bisa digunakan untuk mengontak anda. Tanpa koneksi dengan identitas asli, Session ID anda didesain bersifat anonim dan rahasia." }, - "generateSessionID": { + "createSessionID": { "message": "Buat Session ID" }, "recoveryPhrase": { @@ -1318,9 +1314,6 @@ "enterDisplayName": { "message": "Masukkan nama" }, - "enterSessionIDHere": { - "message": "Masuk ke Session ID" - }, "continueYourSession": { "message": "Lanjutkan Session" }, diff --git a/_locales/it/messages.json b/_locales/it/messages.json index 72b14f3cb1..79d4176ed5 100644 --- a/_locales/it/messages.json +++ b/_locales/it/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Invia ugualmente", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Il tuo numero di sicurezza con $name$ è cambiato e non è più valido. Clicca per visualizzarlo.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", @@ -1312,7 +1308,7 @@ "allUsersAreRandomly...": { "message": "La Sessione ID è l'indirizzo univoco che le persone possono utilizzare per contattarti su una Sessione. Senza alcuna connessione con la tua vera identità, la Sessione ID è totalmente anonimo e privato fin dal incezione." }, - "generateSessionID": { + "createSessionID": { "message": "Crea Sessione ID" }, "recoveryPhrase": { @@ -1324,9 +1320,6 @@ "enterDisplayName": { "message": "Inserisci il nome da visualizzare" }, - "enterSessionIDHere": { - "message": "Inserisci la Sessione ID" - }, "continueYourSession": { "message": "Continua la Sessione" }, diff --git a/_locales/ja/messages.json b/_locales/ja/messages.json index 34005adbff..7e91aa0281 100644 --- a/_locales/ja/messages.json +++ b/_locales/ja/messages.json @@ -40,7 +40,7 @@ "description": "Application menu command to show all application windows" }, "appMenuQuit": { - "message": "Signalを終了する", + "message": "Sessionを終了する", "description": "Application menu command to close the application" }, "editMenuUndo": { @@ -104,11 +104,11 @@ "description": "View menu command to go back to the default zoom" }, "viewMenuZoomIn": { - "message": "ズームインする", + "message": "拡大", "description": "View menu command to make everything bigger" }, "viewMenuZoomOut": { - "message": "ズームアウトする", + "message": "縮小", "description": "View menu command to make everything smaller" }, "viewMenuToggleFullScreen": { @@ -124,7 +124,7 @@ "description": "When the application is not yet set up, menu option to start up the import sequence" }, "menuSetupAsStandalone": { - "message": "独立したデバイスとして設定", + "message": "独立した端末として設定", "description": "Only available on development modes, menu option to open up the standalone device setup sequence" }, "loading": { @@ -154,7 +154,7 @@ "description": "Header shown on the first screen in the data import process" }, "loadDataDescription": { - "message": "Signalの保存データが含まれたフォルダーを選択してください。", + "message": "Sessionの保存データが含まれたフォルダーを選択してください。", "description": "Introduction to the process of importing messages and contacts from disk" }, "importChooserTitle": { @@ -170,7 +170,7 @@ "description": "Header of screen shown as data is import" }, "importErrorFirst": { - "message": "正しいディレクトリを選択したか確認してください。ディレクトリ名はSignal Exportから始まります。なお、旧式のChromeアプリからもデータをコピーできます。", + "message": "正しいディレクトリを選択したか確認してください。ディレクトリ名は「Session Export」から始まります。なお、旧式のChromeアプリからもデータをコピーできます。", "description": "Message shown if the import went wrong; first paragraph" }, "importErrorSecond": { @@ -264,7 +264,7 @@ "description": "When there are multiple previously-verified group members with safety number changes, a banner will be shown. The list of contacts with safety number changes is shown, and this text introduces that list." }, "changedSinceVerifiedMultiple": { - "message": "複数のメンバーで安全番号に変更がありました。誰かが通信を傍受しようとしているかも知れませんし,メンバーがSignalをインストールし直しただけかも知れません。", + "message": "複数のメンバーで安全番号に変更がありました。誰かが通信を傍受しようとしているかも知れませんし,メンバーがSessionをインストールし直しただけかも知れません。", "description": "Shown on confirmation dialog when user attempts to send a message" }, "changedSinceVerified": { @@ -278,7 +278,7 @@ } }, "changedRightAfterVerify": { - "message": "検証しようとしている安全番号に変更がありました。$name$との安全番号を再確認してください。誰かが通信を傍受しようとしているかも知れませんし,$name$がSignalをインストールし直しただけかも知れません。", + "message": "検証しようとしている安全番号に変更がありました。$name$との安全番号を再確認してください。誰かが通信を傍受しようとしているかも知れませんし,$name$がSessionをインストールし直しただけかも知れません。", "description": "Shown on the safety number screen when the user has selected to verify/unverify a contact's safety number, and we immediately discover a safety number change", "placeholders": { "name": { @@ -288,7 +288,7 @@ } }, "changedRecentlyMultiple": { - "message": "安全番号の変更が複数のメンバーで最近ありました。誰かが通信を傍受しようとしているかも知れませんし,メンバーがSignalをインストールし直しただけかも知れません。", + "message": "安全番号の変更が複数のメンバーで最近ありました。誰かが通信を傍受しようとしているかも知れませんし,メンバーがSessionをインストールし直しただけかも知れません。", "description": "Shown on confirmation dialog when user attempts to send a message" }, "changedRecently": { @@ -302,7 +302,7 @@ } }, "identityKeyErrorOnSend": { - "message": "$name$との安全番号に変更がありました。誰かが通信を傍受しようとしているかも知れませんし,$name$がSignalをインストールし直しただけかも知れません。この相手との安全番号を検証することをお勧めします。", + "message": "$name$との安全番号に変更がありました。誰かが通信を傍受しようとしているかも知れませんし,$name$がSessionをインストールし直しただけかも知れません。この相手との安全番号を検証することをお勧めします。", "description": "Shown when user clicks on a failed recipient in the message detail view after an identity key change", "placeholders": { "name": { @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "とにかく送信する", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "$name$との安全番号に変更があり,未検証です。クリックして表示してください。", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", @@ -854,11 +850,11 @@ "description": "Text that links to a support article on verifying safety numbers" }, "expiredWarning": { - "message": "アプリのバージョンが古すぎます。最新版にアップデートしてください。", + "message": "アプリのバージョンが古すぎます。最新版に更新してください。", "description": "Warning notification that this version of the app has expired" }, "upgrade": { - "message": "アップデート", + "message": "最新版に更新", "description": "Label text for button to upgrade the app to the latest version" }, "mediaMessage": { @@ -1092,7 +1088,7 @@ "description": "When a person inputs a number that is invalid" }, "autoUpdateNewVersionTitle": { - "message": "Sessionのアップデートがあります", + "message": "Sessionの新しい更新があります", "description": "" }, "autoUpdateNewVersionMessage": { @@ -1100,7 +1096,7 @@ "description": "" }, "autoUpdateNewVersionInstructions": { - "message": "アップデートを適用するにはSessionを再起動してください。", + "message": "更新を適用するにはSessionを再起動してください。", "description": "" }, "autoUpdateRestartButtonLabel": { @@ -1166,7 +1162,7 @@ } }, "privacyPolicy": { - "message": "使用条件とプライバシーポリシー" + "message": "利用規約とプライバシーポリシー" }, "unknown": { "message": "不明" @@ -1187,7 +1183,7 @@ "message": "続行" }, "devicePairingRequestReceivedLimitTitle": { - "message": "デバイス制限に達しました" + "message": "端末の数の制限に達しました" }, "devicePairingRequestReceivedLimitDescription": { "message": "追加している端末が多すぎます。いくつか削除してください。" @@ -1196,7 +1192,7 @@ "message": "リンクリクエストを受け取りました" }, "waitingForDeviceToRegister": { - "message": "デバイス待ち" + "message": "端末待ち" }, "pairNewDevicePrompt": { "message": "追加する端末に表示されているQRコードをスキャンする" @@ -1205,7 +1201,7 @@ "message": "追加されている端末はありません" }, "deviceUnpaired": { - "message": "デバイスは正常にリンク解除されました" + "message": "端末は正常にリンク解除されました" }, "moreInformation": { "message": "詳細" @@ -1241,7 +1237,7 @@ "message": "ライト" }, "successUnlinked": { - "message": "デバイスは正常にリンク解除されました" + "message": "端末は正常にリンク解除されました" }, "autoUpdateDownloadButtonLabel": { "message": "ダウンロード" @@ -1268,7 +1264,7 @@ "message": "グループを編集する" }, "updateGroupDialogTitle": { - "message": "$name$をアップデート中..." + "message": "$name$を更新中..." }, "showRecoveryPhrase": { "message": "リカバリーフレーズ" @@ -1277,7 +1273,7 @@ "message": "あなたの Session ID" }, "recoveryPhraseSavePromptMain": { - "message": "リカバリーフレーズは、Session ID のマスターキーです。デバイスにアクセスできなくなった場合、これを使用して Session ID を復元できます。リカバリーフレーズを安全な場所に保管し、誰にも教えないでください。" + "message": "リカバリーフレーズは、Session ID のマスターキーです。端末にアクセスできなくなった場合、これを使用して Session ID を復元できます。リカバリーフレーズを安全な場所に保管し、誰にも教えないでください。" }, "copiedToClipboard": { "message": "クリップボードにコピーされました" @@ -1295,7 +1291,7 @@ "message": "削除" }, "invalidSessionId": { - "message": "Session ID が無効です" + "message": "Session ID が不正です" }, "emptyGroupNameError": { "message": "グループ名を入力してください" @@ -1312,7 +1308,7 @@ "allUsersAreRandomly...": { "message": "Session ID は、Session で連絡を取るために使用できる一意のアドレスです。本当のアイデンティティに関係なく、あなたの Session ID は設計上完全に匿名でプライベートです。" }, - "generateSessionID": { + "createSessionID": { "message": "Session ID を作成する" }, "recoveryPhrase": { @@ -1324,14 +1320,11 @@ "enterDisplayName": { "message": "表示名を入力してください" }, - "enterSessionIDHere": { - "message": "Session ID を入力してください" - }, "continueYourSession": { "message": "Session を続ける" }, "linkDevice": { - "message": "デバイスをリンクする" + "message": "端末をリンクする" }, "restoreUsingRecoveryPhrase": { "message": "アカウントを復元する" @@ -1349,7 +1342,7 @@ "message": "受信者の Session ID を入力してください" }, "usersCanShareTheir...": { - "message": "ユーザーは、アカウント設定に移動して [Session ID を共有] をタップするか、QR コードを共有することで、Session ID を共有できます。" + "message": "ユーザーは、アカウント設定に移動して「Session ID を共有」をタップするか、QR コードを共有することで、Session ID を共有できます。" }, "appearanceSettingsTitle": { "message": "デザイン設定" @@ -1370,10 +1363,10 @@ "message": "表示名を選択してください" }, "joinOpenGroup": { - "message": "オープングループに参加する" + "message": "公開グループに参加する" }, "newClosedGroup": { - "message": "新しいクローズドグループ" + "message": "新しい非公開グループ" }, "createClosedGroupNamePrompt": { "message": "グループ名" @@ -1385,7 +1378,7 @@ "message": "グループの URL を開く" }, "enterAnOpenGroupURL": { - "message": "オープングループの URL を入力する" + "message": "公開グループの URL を入力する" }, "next": { "message": "進む" @@ -1403,9 +1396,9 @@ "message": "グループメンバーを少なくとも 2 人選択してください" }, "closedGroupMaxSize": { - "message": "閉じたグループは 100 人を超えるメンバーを抱えることはできません" + "message": "非公開グループは 100 人を超えるメンバーを抱えることはできません" }, "noBlockedContacts": { "message": "ブロックしている連絡先はありません" } -} \ No newline at end of file +} diff --git a/_locales/km/messages.json b/_locales/km/messages.json index b662abcc41..7644466f45 100644 --- a/_locales/km/messages.json +++ b/_locales/km/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "ផ្ញើ ទោះយ៉ាងណាក៏ដោយ", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "លេខសុវត្ថិភាពរបស់អ្នកជាមួយ $name$ បានផ្លាស់ប្តូរ និងមិនត្រូវបានផ្ទៀងផ្ទាត់ឡើយ។ ចុច ដើម្បីបង្ហាញ។", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/kn/messages.json b/_locales/kn/messages.json index ba44ef8cd4..6bb700122e 100644 --- a/_locales/kn/messages.json +++ b/_locales/kn/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Send Anyway", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Your safety number with $name$ has changed and is no longer verified. Click to show.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/ko/messages.json b/_locales/ko/messages.json index cc2680dca5..dc7bd77c4a 100644 --- a/_locales/ko/messages.json +++ b/_locales/ko/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Send Anyway", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Your safety number with $name$ has changed and is no longer verified. Click to show.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/lt/messages.json b/_locales/lt/messages.json index 14fa337b68..6fe8232a84 100644 --- a/_locales/lt/messages.json +++ b/_locales/lt/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Vis tiek siųsti", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Jūsų saugumo numeris su $name$ pasikeitė ir daugiau nebėra patvirtintas. Spustelėkite, norėdami rodyti.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/mk/messages.json b/_locales/mk/messages.json index 1e1e22a667..dc9c8c206f 100644 --- a/_locales/mk/messages.json +++ b/_locales/mk/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Send Anyway", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Your safety number with $name$ has changed and is no longer verified. Click to show.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/nb/messages.json b/_locales/nb/messages.json index 7cc8df710a..570635838c 100644 --- a/_locales/nb/messages.json +++ b/_locales/nb/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Send allikevel", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Ditt sikkerhetsnummer med $name$ er endret og er ikke lenger bekreftet. Klikk for å vise nummeret.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/nl/messages.json b/_locales/nl/messages.json index 0544ff37a6..d540b249d6 100644 --- a/_locales/nl/messages.json +++ b/_locales/nl/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Toch verzenden", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Je veiligheidsnummer met $name$ is veranderd en het is daarom niet langer geverifieerd. Klik om het te tonen.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/nn/messages.json b/_locales/nn/messages.json index 40716a3273..c3956c5ce7 100644 --- a/_locales/nn/messages.json +++ b/_locales/nn/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Send likevel", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Tryggingsnummeret ditt med $name$ er endra og er ikkje lenger godkjent. Klikk for å visa nummeret.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/no/messages.json b/_locales/no/messages.json index cbec2e123d..d1226b011a 100644 --- a/_locales/no/messages.json +++ b/_locales/no/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Send allikevel", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Ditt sikkerhetsnummer med $name$ er endret og er ikke lenger bekreftet. Klikk for å vise nummeret.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/pl/messages.json b/_locales/pl/messages.json index 77d2dcc51e..760cb7d73b 100644 --- a/_locales/pl/messages.json +++ b/_locales/pl/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Wyślij mimo wszystko", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Twój numer bezpieczeństwa z $name$ zmienił się. Naciśnij, aby zobaczyć.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", @@ -1312,7 +1308,7 @@ "allUsersAreRandomly...": { "message": "Twój identyfikator Session to unikalny adres, za pomocą którego można się z Tobą kontaktować w Sesji. Bez połączenia z twoją prawdziwą tożsamością, identyfikator Session jest z założenia całkowicie anonimowy i prywatny." }, - "generateSessionID": { + "createSessionID": { "message": "Utwórz identyfikator Session" }, "recoveryPhrase": { @@ -1324,9 +1320,6 @@ "enterDisplayName": { "message": "Wprowadź wyświetlaną nazwe" }, - "enterSessionIDHere": { - "message": "Wpisz swój identyfikator Session" - }, "continueYourSession": { "message": "Kontynuuj swoją sesję" }, diff --git a/_locales/pt_BR/messages.json b/_locales/pt_BR/messages.json index a95e0db4ab..3cbce99ab6 100644 --- a/_locales/pt_BR/messages.json +++ b/_locales/pt_BR/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Enviar Assim Mesmo", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "O seu número de segurança com$name$ mudou e não foi verificado. Clique para exibi-lo. ", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", @@ -1312,7 +1308,7 @@ "allUsersAreRandomly...": { "message": "Seu ID Session é o endereço exclusivo que as pessoas podem usar para entrar em contato com você no Session. Sem conexão com sua identidade real, seu ID Session é totalmente anônimo e privado por definição." }, - "generateSessionID": { + "createSessionID": { "message": "Criar ID Session" }, "recoveryPhrase": { @@ -1324,9 +1320,6 @@ "enterDisplayName": { "message": "Digite um nome de exibição" }, - "enterSessionIDHere": { - "message": "Digite seu ID Session" - }, "continueYourSession": { "message": "Continuar com seu Session" }, diff --git a/_locales/pt_PT/messages.json b/_locales/pt_PT/messages.json index 25cf867f4f..c80c270c5a 100644 --- a/_locales/pt_PT/messages.json +++ b/_locales/pt_PT/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Enviar mesmo assim", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "O número de segurança com $name$ mudou e não está verificado. Clique para mostrar.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/ro/messages.json b/_locales/ro/messages.json index 2acd34d8df..c9fe218cb6 100644 --- a/_locales/ro/messages.json +++ b/_locales/ro/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Trimite oricum", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Numărul tău de siguranță cu $name$ s-a modificat și nu mai este verificat. Apasă pentru a afișa.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json index 06233c3956..be2be9403b 100644 --- a/_locales/ru/messages.json +++ b/_locales/ru/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Отправить в любом случае", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Код безопасности с $name$ изменился и более не является подтвержденным. Нажмите, чтобы показать.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", @@ -1312,7 +1308,7 @@ "allUsersAreRandomly...": { "message": "Ваш Session ID - это уникальный адрес, который другие пользователи могут использовать для связи с вами при помощи Session. Поскольку ваш Session ID никак не связан с вашей настоящей личностью, он по определению является полностью анонимным и конфиденциальным." }, - "generateSessionID": { + "createSessionID": { "message": "Создать Session ID" }, "recoveryPhrase": { @@ -1324,9 +1320,6 @@ "enterDisplayName": { "message": "Введите отображаемое имя" }, - "enterSessionIDHere": { - "message": "Введите свой Session ID" - }, "continueYourSession": { "message": "Восстановить Session ID" }, @@ -1519,10 +1512,6 @@ "message": "Your clock is out of sync. Please update your clock and try again.", "description": "Notifcation that user's clock is out of sync with Loki's servers." }, - "messageBodyTooLong": { - "message": "Message body is too long.", - "description": "Shown if the user tries to send more than 64kb of text" - }, "changeNickname": { "message": "Change Nickname", "description": "Conversation menu option to change user nickname" diff --git a/_locales/sk/messages.json b/_locales/sk/messages.json index 72f9f0de1b..50a63acdf0 100644 --- a/_locales/sk/messages.json +++ b/_locales/sk/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Napriek tomu poslať", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Vaše bezpečnosné číslo s $name$ sa zmenilo, a už nie je overené. Kliknite pre zobrazenie. ", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/sl/messages.json b/_locales/sl/messages.json index 3bdd63fc47..cd9711dd19 100644 --- a/_locales/sl/messages.json +++ b/_locales/sl/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Vseeno pošlji", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Vaše varnostno število z uporabnikom $name$ je bilo spremenjeno in ni več označeno kot potrjeno. Kliknite za prikaz.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/sq/messages.json b/_locales/sq/messages.json index a2b32f9df9..cef46e4ae1 100644 --- a/_locales/sq/messages.json +++ b/_locales/sq/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Dërgoje Sido Qoftë", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Numri juaj i sigurisë për me $name$ ka ndryshuar dhe s’është më i verifikuar. Klikoni që të shfaqet.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/sr/messages.json b/_locales/sr/messages.json index 3a627d302c..6d0d5b3bea 100644 --- a/_locales/sr/messages.json +++ b/_locales/sr/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Пошаљи свакако", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Ваша шифра за $name$ је промењена и није више проверена. Притисните да би сте приказали.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/sv/messages.json b/_locales/sv/messages.json index cd6d21e01a..fb6148cfef 100644 --- a/_locales/sv/messages.json +++ b/_locales/sv/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Skicka ändå", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Your safety number with $name$ has changed and is no longer verified. Click to show.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/th/messages.json b/_locales/th/messages.json index 19b88bc73f..e29aefe0c2 100644 --- a/_locales/th/messages.json +++ b/_locales/th/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "ยืนยันที่จะส่ง", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "มีการเปลี่ยนแปลงในรหัสความปลอดภัยของคุณกับ $name$ และถือว่ายังไม่ได้รับการยืนยัน คลิกเพื่อแสดง", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/tr/messages.json b/_locales/tr/messages.json index 6d3b9d8bf7..520fe15188 100644 --- a/_locales/tr/messages.json +++ b/_locales/tr/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Yine de Gönder", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "$name$ ile olan güvenlik numaranız değişti ve henüz doğrulanmadı. Göstermek için tıklayın.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/uk/messages.json b/_locales/uk/messages.json index c55c35da68..a043fcb5b1 100644 --- a/_locales/uk/messages.json +++ b/_locales/uk/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Усе одно надіслати", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "$name$ та ви тепер використовуєте новий код безпеки. Натисніть, щоб подивитися.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", @@ -1165,4 +1161,4 @@ } } } -} +} \ No newline at end of file diff --git a/_locales/vi/messages.json b/_locales/vi/messages.json index d5d754c5c3..b51f3bdea7 100644 --- a/_locales/vi/messages.json +++ b/_locales/vi/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "Send Anyway", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "Your safety number with $name$ has changed and is no longer verified. Click to show.", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", @@ -1276,7 +1272,7 @@ "allUsersAreRandomly...": { "message": "Session ID của bạn là địa chỉ duy nhất mà mọi người có thể dùng để liên lạc với bạn trên ứng dụng Session. Session ID của bạn được thiết kế đảm bảo tuyệt đối ẩn danh và riêng tư vì nó không liên kết với danh tính thật của bạn." }, - "generateSessionID": { + "createSessionID": { "message": "Tạo Session ID" }, "recoveryPhrase": { @@ -1288,9 +1284,6 @@ "enterDisplayName": { "message": "Nhập một tên hiển thị" }, - "enterSessionIDHere": { - "message": "Nhập Session ID của bạn" - }, "continueYourSession": { "message": "Tiếp tục Session của bạn" }, diff --git a/_locales/zh_CN/messages.json b/_locales/zh_CN/messages.json index 916c500e07..d913bc1f4e 100644 --- a/_locales/zh_CN/messages.json +++ b/_locales/zh_CN/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "仍要发送", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "您与 $name$ 的安全号码已发生改变,而且不再被确认。点击展示。", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/_locales/zh_TW/messages.json b/_locales/zh_TW/messages.json index 44656abfe8..e145bf82b5 100644 --- a/_locales/zh_TW/messages.json +++ b/_locales/zh_TW/messages.json @@ -311,10 +311,6 @@ } } }, - "sendAnyway": { - "message": "無論如何都送出", - "description": "Used on a warning dialog to make it clear that it might be risky to send the message." - }, "noLongerVerified": { "message": "你與 $name$ 的安全已經產生變動,並且不再是經驗證過的。點擊來顯示。", "description": "Shown in converation banner when user's safety number has changed, but they were previously verified.", diff --git a/app/sql.js b/app/sql.js index 34aede29df..670247469f 100644 --- a/app/sql.js +++ b/app/sql.js @@ -7,7 +7,6 @@ const { redactAll } = require('../js/modules/privacy'); const { remove: removeUserConfig } = require('./user_config'); const pify = require('pify'); -const uuidv4 = require('uuid/v4'); const { map, isString, @@ -26,67 +25,24 @@ module.exports = { initialize, close, removeDB, - removeIndexedDBFiles, setSQLPassword, getPasswordHash, savePasswordHash, removePasswordHash, - createOrUpdateIdentityKey, getIdentityKeyById, - bulkAddIdentityKeys, - removeIdentityKeyById, - removeAllIdentityKeys, - getAllIdentityKeys, - - createOrUpdatePreKey, - getPreKeyById, - getPreKeyByRecipient, - bulkAddPreKeys, - removePreKeyById, - removeAllPreKeys, - getAllPreKeys, - createOrUpdateSignedPreKey, - getSignedPreKeyById, - getAllSignedPreKeys, - bulkAddSignedPreKeys, - removeSignedPreKeyById, removeAllSignedPreKeys, - - createOrUpdateContactPreKey, - getContactPreKeyById, - getContactPreKeyByIdentityKey, - getContactPreKeys, - getAllContactPreKeys, - bulkAddContactPreKeys, - removeContactPreKeyByIdentityKey, removeAllContactPreKeys, - - createOrUpdateContactSignedPreKey, - getContactSignedPreKeyById, - getContactSignedPreKeyByIdentityKey, - getContactSignedPreKeys, - bulkAddContactSignedPreKeys, - removeContactSignedPreKeyByIdentityKey, removeAllContactSignedPreKeys, + removeAllPreKeys, + removeAllSessions, createOrUpdateItem, getItemById, getAllItems, - bulkAddItems, removeItemById, - removeAllItems, - - createOrUpdateSession, - getSessionById, - getSessionsByNumber, - bulkAddSessions, - removeSessionById, - removeSessionsByNumber, - removeAllSessions, - getAllSessions, getSwarmNodesForPubkey, updateSwarmNodesForPubkey, @@ -95,7 +51,6 @@ module.exports = { getConversationCount, saveConversation, - saveConversations, getConversationById, savePublicServerToken, getPublicServerTokenByServerUrl, @@ -103,12 +58,10 @@ module.exports = { removeConversation, getAllConversations, getAllPublicConversations, - getPublicConversationsByServer, getPubkeysInPublicConversation, getAllConversationIds, getAllGroupsInvolvingId, removeAllConversations, - removeAllPrivateConversations, searchConversations, searchMessages, @@ -126,12 +79,10 @@ module.exports = { getUnreadByConversation, getUnreadCountByConversation, getMessageBySender, - getMessagesBySender, getMessageIdsFromServerIds, getMessageById, getAllMessages, getAllMessageIds, - getAllUnsentMessages, getMessagesBySentAt, getSeenMessagesByHashList, getLastHashBySnode, @@ -146,7 +97,6 @@ module.exports = { updateUnprocessedAttempts, updateUnprocessedWithData, getUnprocessedById, - saveUnprocesseds, removeUnprocessed, removeAllUnprocessed, @@ -158,16 +108,12 @@ module.exports = { removeAllAttachmentDownloadJobs, removeAll, - removeAllConfiguration, - getMessagesNeedingUpgrade, getMessagesWithVisualMediaAttachments, getMessagesWithFileAttachments, removeKnownAttachments, - removeAllClosedGroupRatchets, - getAllEncryptionKeyPairsForGroup, getLatestClosedGroupEncryptionKeyPair, addClosedGroupEncryptionKeyPair, @@ -175,10 +121,6 @@ module.exports = { removeAllClosedGroupEncryptionKeyPairs, }; -function generateUUID() { - return uuidv4(); -} - function objectToJSON(data) { return JSON.stringify(data); } @@ -906,12 +848,6 @@ async function updateToLokiSchemaVersion3(currentVersion, instance) { const SENDER_KEYS_TABLE = 'senderKeys'; -async function removeAllClosedGroupRatchets(groupId) { - await db.run(`DELETE FROM ${SENDER_KEYS_TABLE} WHERE groupId = $groupId;`, { - $groupId: groupId, - }); -} - async function updateToLokiSchemaVersion4(currentVersion, instance) { if (currentVersion >= 4) { return; @@ -1181,11 +1117,8 @@ async function createLokiSchemaTable(instance) { let db; let filePath; -let indexedDBPath; function _initializePaths(configDir) { - indexedDBPath = path.join(configDir, 'IndexedDB'); - const dbDir = path.join(configDir, 'sql'); mkdirp.sync(dbDir); @@ -1297,18 +1230,6 @@ async function removeDB(configDir = null) { rimraf.sync(filePath); } -async function removeIndexedDBFiles() { - if (!indexedDBPath) { - throw new Error( - 'removeIndexedDBFiles: Need to initialize and set indexedDBPath first!' - ); - } - - const pattern = path.join(indexedDBPath, '*.leveldb'); - rimraf.sync(pattern); - indexedDBPath = null; -} - // Password hash const PASS_HASH_ID = 'passHash'; async function getPasswordHash() { @@ -1328,226 +1249,33 @@ async function removePasswordHash() { } const IDENTITY_KEYS_TABLE = 'identityKeys'; -async function createOrUpdateIdentityKey(data) { - return createOrUpdate(IDENTITY_KEYS_TABLE, data); -} async function getIdentityKeyById(id, instance) { return getById(IDENTITY_KEYS_TABLE, id, instance); } -async function bulkAddIdentityKeys(array) { - return bulkAdd(IDENTITY_KEYS_TABLE, array); -} -async function removeIdentityKeyById(id) { - return removeById(IDENTITY_KEYS_TABLE, id); -} -async function removeAllIdentityKeys() { - return removeAllFromTable(IDENTITY_KEYS_TABLE); -} -async function getAllIdentityKeys() { - return getAllFromTable(IDENTITY_KEYS_TABLE); -} +// those removeAll calls are currently only used to cleanup the db from old data +// TODO remove those and move those removeAll in a migration const PRE_KEYS_TABLE = 'preKeys'; -async function createOrUpdatePreKey(data) { - const { id, recipient } = data; - if (!id) { - throw new Error('createOrUpdate: Provided data did not have a truthy id'); - } - - await db.run( - `INSERT OR REPLACE INTO ${PRE_KEYS_TABLE} ( - id, - recipient, - json - ) values ( - $id, - $recipient, - $json - )`, - { - $id: id, - $recipient: recipient || '', - $json: objectToJSON(data), - } - ); -} -async function getPreKeyById(id) { - return getById(PRE_KEYS_TABLE, id); -} -async function getPreKeyByRecipient(recipient) { - const row = await db.get( - `SELECT * FROM ${PRE_KEYS_TABLE} WHERE recipient = $recipient;`, - { - $recipient: recipient, - } - ); - - if (!row) { - return null; - } - - return jsonToObject(row.json); -} -async function bulkAddPreKeys(array) { - return bulkAdd(PRE_KEYS_TABLE, array); -} -async function removePreKeyById(id) { - return removeById(PRE_KEYS_TABLE, id); -} async function removeAllPreKeys() { return removeAllFromTable(PRE_KEYS_TABLE); } -async function getAllPreKeys() { - return getAllFromTable(PRE_KEYS_TABLE); -} - const CONTACT_PRE_KEYS_TABLE = 'contactPreKeys'; -async function createOrUpdateContactPreKey(data) { - const { keyId, identityKeyString } = data; - - await db.run( - `INSERT OR REPLACE INTO ${CONTACT_PRE_KEYS_TABLE} ( - keyId, - identityKeyString, - json - ) values ( - $keyId, - $identityKeyString, - $json - )`, - { - $keyId: keyId, - $identityKeyString: identityKeyString || '', - $json: objectToJSON(data), - } - ); -} -async function getContactPreKeyById(id) { - return getById(CONTACT_PRE_KEYS_TABLE, id); -} -async function getContactPreKeyByIdentityKey(key) { - const row = await db.get( - `SELECT * FROM ${CONTACT_PRE_KEYS_TABLE} WHERE identityKeyString = $identityKeyString ORDER BY keyId DESC LIMIT 1;`, - { - $identityKeyString: key, - } - ); - - if (!row) { - return null; - } - - return jsonToObject(row.json); -} -async function getContactPreKeys(keyId, identityKeyString) { - const query = `SELECT * FROM ${CONTACT_PRE_KEYS_TABLE} WHERE identityKeyString = $identityKeyString AND keyId = $keyId;`; - const rows = await db.all(query, { - $keyId: keyId, - $identityKeyString: identityKeyString, - }); - return map(rows, row => jsonToObject(row.json)); -} - -async function bulkAddContactPreKeys(array) { - return bulkAdd(CONTACT_PRE_KEYS_TABLE, array); -} -async function removeContactPreKeyByIdentityKey(key) { - await db.run( - `DELETE FROM ${CONTACT_PRE_KEYS_TABLE} WHERE identityKeyString = $identityKeyString;`, - { - $identityKeyString: key, - } - ); -} async function removeAllContactPreKeys() { return removeAllFromTable(CONTACT_PRE_KEYS_TABLE); } - const CONTACT_SIGNED_PRE_KEYS_TABLE = 'contactSignedPreKeys'; -async function createOrUpdateContactSignedPreKey(data) { - const { keyId, identityKeyString } = data; - - await db.run( - `INSERT OR REPLACE INTO ${CONTACT_SIGNED_PRE_KEYS_TABLE} ( - keyId, - identityKeyString, - json - ) values ( - $keyId, - $identityKeyString, - $json - )`, - { - $keyId: keyId, - $identityKeyString: identityKeyString || '', - $json: objectToJSON(data), - } - ); -} -async function getContactSignedPreKeyById(id) { - return getById(CONTACT_SIGNED_PRE_KEYS_TABLE, id); -} -async function getContactSignedPreKeyByIdentityKey(key) { - const row = await db.get( - `SELECT * FROM ${CONTACT_SIGNED_PRE_KEYS_TABLE} WHERE identityKeyString = $identityKeyString ORDER BY keyId DESC;`, - { - $identityKeyString: key, - } - ); - - if (!row) { - return null; - } - return jsonToObject(row.json); -} -async function getContactSignedPreKeys(keyId, identityKeyString) { - const query = `SELECT * FROM ${CONTACT_SIGNED_PRE_KEYS_TABLE} WHERE identityKeyString = $identityKeyString AND keyId = $keyId;`; - const rows = await db.all(query, { - $keyId: keyId, - $identityKeyString: identityKeyString, - }); - return map(rows, row => jsonToObject(row.json)); -} -async function bulkAddContactSignedPreKeys(array) { - return bulkAdd(CONTACT_SIGNED_PRE_KEYS_TABLE, array); -} -async function removeContactSignedPreKeyByIdentityKey(key) { - await db.run( - `DELETE FROM ${CONTACT_SIGNED_PRE_KEYS_TABLE} WHERE identityKeyString = $identityKeyString;`, - { - $identityKeyString: key, - } - ); -} async function removeAllContactSignedPreKeys() { return removeAllFromTable(CONTACT_SIGNED_PRE_KEYS_TABLE); } - const SIGNED_PRE_KEYS_TABLE = 'signedPreKeys'; -async function createOrUpdateSignedPreKey(data) { - return createOrUpdate(SIGNED_PRE_KEYS_TABLE, data); -} -async function getSignedPreKeyById(id) { - return getById(SIGNED_PRE_KEYS_TABLE, id); -} -async function getAllSignedPreKeys() { - const rows = await db.all('SELECT json FROM signedPreKeys ORDER BY id ASC;'); - return map(rows, row => jsonToObject(row.json)); -} -async function getAllContactPreKeys() { - const rows = await db.all('SELECT json FROM contactPreKeys ORDER BY id ASC;'); - return map(rows, row => jsonToObject(row.json)); -} -async function bulkAddSignedPreKeys(array) { - return bulkAdd(SIGNED_PRE_KEYS_TABLE, array); -} -async function removeSignedPreKeyById(id) { - return removeById(SIGNED_PRE_KEYS_TABLE, id); -} async function removeAllSignedPreKeys() { return removeAllFromTable(SIGNED_PRE_KEYS_TABLE); } +const SESSIONS_TABLE = 'sessions'; +async function removeAllSessions() { + return removeAllFromTable(SESSIONS_TABLE); +} const GUARD_NODE_TABLE = 'guardNodes'; @@ -1596,73 +1324,9 @@ async function getAllItems() { const rows = await db.all('SELECT json FROM items ORDER BY id ASC;'); return map(rows, row => jsonToObject(row.json)); } -async function bulkAddItems(array) { - return bulkAdd(ITEMS_TABLE, array); -} async function removeItemById(id) { return removeById(ITEMS_TABLE, id); } -async function removeAllItems() { - return removeAllFromTable(ITEMS_TABLE); -} - -const SESSIONS_TABLE = 'sessions'; -async function createOrUpdateSession(data) { - const { id, number } = data; - if (!id) { - throw new Error( - 'createOrUpdateSession: Provided data did not have a truthy id' - ); - } - if (!number) { - throw new Error( - 'createOrUpdateSession: Provided data did not have a truthy number' - ); - } - - await db.run( - `INSERT OR REPLACE INTO sessions ( - id, - number, - json - ) values ( - $id, - $number, - $json - )`, - { - $id: id, - $number: number, - $json: objectToJSON(data), - } - ); -} -async function getSessionById(id) { - return getById(SESSIONS_TABLE, id); -} -async function getSessionsByNumber(number) { - const rows = await db.all('SELECT * FROM sessions WHERE number = $number;', { - $number: number, - }); - return map(rows, row => jsonToObject(row.json)); -} -async function bulkAddSessions(array) { - return bulkAdd(SESSIONS_TABLE, array); -} -async function removeSessionById(id) { - return removeById(SESSIONS_TABLE, id); -} -async function removeSessionsByNumber(number) { - await db.run('DELETE FROM sessions WHERE number = $number;', { - $number: number, - }); -} -async function removeAllSessions() { - return removeAllFromTable(SESSIONS_TABLE); -} -async function getAllSessions() { - return getAllFromTable(SESSIONS_TABLE); -} async function createOrUpdate(table, data) { const { id } = data; @@ -1685,20 +1349,6 @@ async function createOrUpdate(table, data) { ); } -async function bulkAdd(table, array) { - let promise; - - db.serialize(() => { - promise = Promise.all([ - db.run('BEGIN TRANSACTION;'), - ...map(array, data => createOrUpdate(table, data)), - db.run('COMMIT TRANSACTION;'), - ]); - }); - - await promise; -} - async function getById(table, id, instance) { const row = await (db || instance).get( `SELECT * FROM ${table} WHERE id = $id;`, @@ -1735,11 +1385,6 @@ async function removeAllFromTable(table) { await db.run(`DELETE FROM ${table};`); } -async function getAllFromTable(table) { - const rows = await db.all(`SELECT json FROM ${table};`); - return rows.map(row => jsonToObject(row.json)); -} - // Conversations async function getSwarmNodesForPubkey(pubkey) { @@ -1831,22 +1476,6 @@ async function saveConversation(data) { ); } -async function saveConversations(arrayOfConversations) { - let promise; - - db.serialize(() => { - promise = Promise.all([ - db.run('BEGIN TRANSACTION;'), - ...map(arrayOfConversations, conversation => - saveConversation(conversation) - ), - db.run('COMMIT TRANSACTION;'), - ]); - }); - - await promise; -} - async function updateConversation(data) { const { id, @@ -1974,19 +1603,6 @@ async function getAllPublicConversations() { return map(rows, row => jsonToObject(row.json)); } -async function getPublicConversationsByServer(server) { - const rows = await db.all( - `SELECT * FROM ${CONVERSATIONS_TABLE} WHERE - server = $server - ORDER BY id ASC;`, - { - $server: server, - } - ); - - return map(rows, row => jsonToObject(row.json)); -} - async function getPubkeysInPublicConversation(id) { const rows = await db.all( `SELECT DISTINCT source FROM ${MESSAGES_TABLE} WHERE @@ -2099,7 +1715,7 @@ async function getMessageCount() { return row['count(*)']; } -async function saveMessage(data, { forceSave } = {}) { +async function saveMessage(data) { const { body, conversationId, @@ -2125,6 +1741,14 @@ async function saveMessage(data, { forceSave } = {}) { expirationStartTimestamp, } = data; + if (!id) { + throw new Error('id is required'); + } + + if (!conversationId) { + throw new Error('conversationId is required'); + } + const payload = { $id: id, $json: objectToJSON(data), @@ -2149,46 +1773,10 @@ async function saveMessage(data, { forceSave } = {}) { $unread: unread, }; - if (id && !forceSave) { - await db.run( - `UPDATE messages SET - json = $json, - serverId = $serverId, - serverTimestamp = $serverTimestamp, - body = $body, - conversationId = $conversationId, - expirationStartTimestamp = $expirationStartTimestamp, - expires_at = $expires_at, - expireTimer = $expireTimer, - hasAttachments = $hasAttachments, - hasFileAttachments = $hasFileAttachments, - hasVisualMediaAttachments = $hasVisualMediaAttachments, - id = $id, - received_at = $received_at, - schemaVersion = $schemaVersion, - sent = $sent, - sent_at = $sent_at, - source = $source, - sourceDevice = $sourceDevice, - type = $type, - unread = $unread - WHERE id = $id;`, - payload - ); - - return id; - } - - const toCreate = { - ...data, - id: id || generateUUID(), - }; - await db.run( - `INSERT INTO messages ( + `INSERT OR REPLACE INTO ${MESSAGES_TABLE} ( id, json, - serverId, serverTimestamp, body, @@ -2210,7 +1798,6 @@ async function saveMessage(data, { forceSave } = {}) { ) values ( $id, $json, - $serverId, $serverTimestamp, $body, @@ -2232,12 +1819,11 @@ async function saveMessage(data, { forceSave } = {}) { );`, { ...payload, - $id: toCreate.id, - $json: objectToJSON(toCreate), + $json: objectToJSON(data), } ); - return toCreate.id; + return id; } async function saveSeenMessageHashes(arrayOfHashes) { @@ -2309,13 +1895,13 @@ async function cleanSeenMessages() { }); } -async function saveMessages(arrayOfMessages, { forceSave } = {}) { +async function saveMessages(arrayOfMessages) { let promise; db.serialize(() => { promise = Promise.all([ db.run('BEGIN TRANSACTION;'), - ...map(arrayOfMessages, message => saveMessage(message, { forceSave })), + ...map(arrayOfMessages, message => saveMessage(message)), db.run('COMMIT TRANSACTION;'), ]); }); @@ -2412,30 +1998,6 @@ async function getMessageBySender({ source, sourceDevice, sent_at }) { return map(rows, row => jsonToObject(row.json)); } -async function getMessagesBySender({ source, sourceDevice }) { - const rows = await db.all( - `SELECT json FROM ${MESSAGES_TABLE} WHERE - source = $source AND - sourceDevice = $sourceDevice`, - { - $source: source, - $sourceDevice: sourceDevice, - } - ); - - return map(rows, row => jsonToObject(row.json)); -} - -async function getAllUnsentMessages() { - const rows = await db.all(` - SELECT json FROM ${MESSAGES_TABLE} WHERE - type IN ('outgoing') AND - NOT sent - ORDER BY sent_at DESC; - `); - return map(rows, row => jsonToObject(row.json)); -} - async function getUnreadByConversation(conversationId) { const rows = await db.all( `SELECT json FROM ${MESSAGES_TABLE} WHERE @@ -2473,6 +2035,8 @@ async function getUnreadCountByConversation(conversationId) { } // Note: Sorting here is necessary for getting the last message (with limit 1) +// be sure to update the sorting order to sort messages on reduxz too (sortMessages + async function getMessagesByConversation( conversationId, { limit = 100, receivedAt = Number.MAX_VALUE, type = '%' } = {} @@ -2483,7 +2047,7 @@ async function getMessagesByConversation( conversationId = $conversationId AND received_at < $received_at AND type LIKE $type - ORDER BY serverTimestamp DESC, serverId DESC, sent_at DESC + ORDER BY serverTimestamp DESC, serverId DESC, sent_at DESC, received_at DESC LIMIT $limit; `, { @@ -2576,50 +2140,29 @@ async function getNextExpiringMessage() { return map(rows, row => jsonToObject(row.json)); } -async function saveUnprocessed(data, { forceSave } = {}) { +/* Unproccessed a received messages not yet processed */ +async function saveUnprocessed(data) { const { id, timestamp, version, attempts, envelope, senderIdentity } = data; if (!id) { - throw new Error('saveUnprocessed: id was falsey'); - } - - if (forceSave) { - await db.run( - `INSERT INTO unprocessed ( - id, - timestamp, - version, - attempts, - envelope, - senderIdentity - ) values ( - $id, - $timestamp, - $version, - $attempts, - $envelope, - $senderIdentity - );`, - { - $id: id, - $timestamp: timestamp, - $version: version, - $attempts: attempts, - $envelope: envelope, - $senderIdentity: senderIdentity, - } - ); - - return id; + throw new Error(`saveUnprocessed: id was falsey: ${id}`); } await db.run( - `UPDATE unprocessed SET - timestamp = $timestamp, - version = $version, - attempts = $attempts, - envelope = $envelope, - senderIdentity = $senderIdentity - WHERE id = $id;`, + `INSERT OR REPLACE INTO unprocessed ( + id, + timestamp, + version, + attempts, + envelope, + senderIdentity + ) values ( + $id, + $timestamp, + $version, + $attempts, + $envelope, + $senderIdentity + );`, { $id: id, $timestamp: timestamp, @@ -2633,22 +2176,6 @@ async function saveUnprocessed(data, { forceSave } = {}) { return id; } -async function saveUnprocesseds(arrayOfUnprocessed, { forceSave } = {}) { - let promise; - - db.serialize(() => { - promise = Promise.all([ - db.run('BEGIN TRANSACTION;'), - ...map(arrayOfUnprocessed, unprocessed => - saveUnprocessed(unprocessed, { forceSave }) - ), - db.run('COMMIT TRANSACTION;'), - ]); - }); - - await promise; -} - async function updateUnprocessedAttempts(id, attempts) { await db.run('UPDATE unprocessed SET attempts = $attempts WHERE id = $id;', { $id: id, @@ -2803,7 +2330,20 @@ async function removeAll() { db.serialize(() => { promise = Promise.all([ db.run('BEGIN TRANSACTION;'), - ...getRemoveConfigurationPromises(), + db.run('DELETE FROM identityKeys;'), + db.run('DELETE FROM items;'), + db.run('DELETE FROM preKeys;'), + db.run('DELETE FROM sessions;'), + db.run('DELETE FROM signedPreKeys;'), + db.run('DELETE FROM unprocessed;'), + db.run('DELETE FROM contactPreKeys;'), + db.run('DELETE FROM contactSignedPreKeys;'), + db.run('DELETE FROM servers;'), + db.run('DELETE FROM lastHashes;'), + db.run(`DELETE FROM ${SENDER_KEYS_TABLE};`), + db.run(`DELETE FROM ${NODES_FOR_PUBKEY_TABLE};`), + db.run(`DELETE FROM ${CLOSED_GROUP_V2_KEY_PAIRS_TABLE};`), + db.run('DELETE FROM seenMessages;'), db.run(`DELETE FROM ${CONVERSATIONS_TABLE};`), db.run(`DELETE FROM ${MESSAGES_TABLE};`), db.run('DELETE FROM attachment_downloads;'), @@ -2815,62 +2355,10 @@ async function removeAll() { await promise; } -function getRemoveConfigurationPromises() { - return [ - db.run('DELETE FROM identityKeys;'), - db.run('DELETE FROM items;'), - db.run('DELETE FROM preKeys;'), - db.run('DELETE FROM sessions;'), - db.run('DELETE FROM signedPreKeys;'), - db.run('DELETE FROM unprocessed;'), - db.run('DELETE FROM contactPreKeys;'), - db.run('DELETE FROM contactSignedPreKeys;'), - db.run('DELETE FROM servers;'), - db.run('DELETE FROM lastHashes;'), - db.run(`DELETE FROM ${SENDER_KEYS_TABLE};`), - db.run(`DELETE FROM ${NODES_FOR_PUBKEY_TABLE};`), - db.run(`DELETE FROM ${CLOSED_GROUP_V2_KEY_PAIRS_TABLE};`), - db.run('DELETE FROM seenMessages;'), - ]; -} - -// Anything that isn't user-visible data -async function removeAllConfiguration() { - let promise; - - db.serialize(() => { - promise = Promise.all([ - db.run('BEGIN TRANSACTION;'), - ...getRemoveConfigurationPromises(), - db.run('COMMIT TRANSACTION;'), - ]); - }); - - await promise; -} - async function removeAllConversations() { await removeAllFromTable(CONVERSATIONS_TABLE); } -async function removeAllPrivateConversations() { - await db.run(`DELETE FROM ${CONVERSATIONS_TABLE} WHERE type = 'private'`); -} - -async function getMessagesNeedingUpgrade(limit, { maxVersion }) { - const rows = await db.all( - `SELECT json FROM ${MESSAGES_TABLE} - WHERE schemaVersion IS NULL OR schemaVersion < $maxVersion - LIMIT $limit;`, - { - $maxVersion: maxVersion, - $limit: limit, - } - ); - - return map(rows, row => jsonToObject(row.json)); -} - async function getMessagesWithVisualMediaAttachments( conversationId, { limit } diff --git a/background.html b/background.html index f1eab8f015..74629f9b48 100644 --- a/background.html +++ b/background.html @@ -1,13 +1,14 @@ + - + - + style-src 'self' 'unsafe-inline';"> Session @@ -27,19 +27,7 @@ When making changes to these templates, be sure to update test/index.html as well --> - - - - - - - - @@ -141,8 +121,6 @@ - - @@ -169,7 +147,6 @@ - @@ -177,6 +154,7 @@ +