Merge remote-tracking branch 'upstream/dev' into fix/nan-crash

pull/1061/head
Morgan Pretty 1 week ago
commit bdfb83e211

@ -182477,6 +182477,17 @@
}
}
},
"failedToDownload" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Failed to download"
}
}
}
},
"failures" : {
"extractionState" : "manual",
"localizations" : {
@ -228723,6 +228734,17 @@
}
}
},
"images" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "images"
}
}
}
},
"incognitoKeyboard" : {
"extractionState" : "manual",
"localizations" : {
@ -289261,6 +289283,17 @@
}
}
},
"notificationsFastModeDescriptionHuawei" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "You'll be notified of new messages reliably and immediately using Huaweis notification servers."
}
}
}
},
"notificationsFastModeDescriptionIos" : {
"extractionState" : "manual",
"localizations" : {
@ -324725,6 +324758,17 @@
}
}
},
"permissionChange" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Permission Change"
}
}
}
},
"permissionMusicAudioDenied" : {
"extractionState" : "manual",
"localizations" : {
@ -326641,6 +326685,17 @@
}
}
},
"permissionsCameraAccessRequiredCallsIos" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Camera access is required to make video calls. Toggle the \"Camera\" permission in Settings to continue."
}
}
}
},
"permissionsCameraDenied" : {
"extractionState" : "manual",
"localizations" : {
@ -327108,6 +327163,17 @@
}
}
},
"permissionsCameraDescriptionIos" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Allow access to camera for video calls."
}
}
}
},
"permissionsFaceId" : {
"extractionState" : "manual",
"localizations" : {
@ -329036,6 +329102,17 @@
}
}
},
"permissionsLocalNetworkAccessRequiredCallsIos" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Local Network access is required to facilitate calls. Toggle the \"Local Network\" permission in Settings to continue."
}
}
}
},
"permissionsLocalNetworkAccessRequiredIos" : {
"extractionState" : "manual",
"localizations" : {
@ -329047,6 +329124,39 @@
}
}
},
"permissionsLocalNetworkChangeDescriptionIos" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Local Network access is currently enabled. To disable it, toggle the “Local Network” permission in Settings."
}
}
}
},
"permissionsLocalNetworkDescriptionIos" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Allow access to local network to facilitate voice and video calls."
}
}
}
},
"permissionsLocalNetworkIos" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Local Network"
}
}
}
},
"permissionsMicrophone" : {
"extractionState" : "manual",
"localizations" : {
@ -329999,6 +330109,17 @@
}
}
},
"permissionsMicrophoneAccessRequiredCallsIos" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Microphone access is required to make calls and record audio messages. Toggle the \"Microphone\" permission in Settings to continue."
}
}
}
},
"permissionsMicrophoneAccessRequiredDesktop" : {
"extractionState" : "manual",
"localizations" : {
@ -331436,6 +331557,17 @@
}
}
},
"permissionsMicrophoneDescriptionIos" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Allow access to microphone for voice calls and audio messages."
}
}
}
},
"permissionsMusicAudio" : {
"extractionState" : "manual",
"localizations" : {
@ -348957,7 +349089,7 @@
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "An error occurred when trying to load your recovery password.<br/><br/>Please export your logs, then upload the file though the {app_name} Help Desk to help resolve this issue."
"value" : "An error occurred when trying to load your recovery password.<br/><br/>Please export your logs, then upload the file through the {app_name} Help Desk to help resolve this issue."
}
}
}
@ -383179,6 +383311,17 @@
}
}
},
"tapToRetry" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Tap to retry"
}
}
}
},
"theContinue" : {
"extractionState" : "manual",
"localizations" : {
@ -389918,484 +390061,10 @@
"updateNewVersionDescription" : {
"extractionState" : "manual",
"localizations" : {
"af" : {
"stringUnit" : {
"state" : "translated",
"value" : "n Nuwe weergawe van {app_name} is beskikbaar"
}
},
"ar" : {
"stringUnit" : {
"state" : "translated",
"value" : "إصدار جديد من {app_name} متاح."
}
},
"az" : {
"stringUnit" : {
"state" : "translated",
"value" : "{app_name} üçün yeni versiyası mövcuddur."
}
},
"bal" : {
"stringUnit" : {
"state" : "translated",
"value" : "New version {app_name} wājūd dā."
}
},
"be" : {
"stringUnit" : {
"state" : "translated",
"value" : "Даступна новая версія {app_name}."
}
},
"bg" : {
"stringUnit" : {
"state" : "translated",
"value" : "Налична е нова версия на {app_name}."
}
},
"bn" : {
"stringUnit" : {
"state" : "translated",
"value" : "{app_name} এর একটি নতুন সংস্করণ উপলব্ধ।"
}
},
"ca" : {
"stringUnit" : {
"state" : "translated",
"value" : "Hi ha disponible una nova versió de {app_name}"
}
},
"cs" : {
"stringUnit" : {
"state" : "translated",
"value" : "<b>Je dostupná nová verze {app_name}.</b>"
}
},
"cy" : {
"stringUnit" : {
"state" : "translated",
"value" : "Mae fersiwn newydd o {app_name} ar gael."
}
},
"da" : {
"stringUnit" : {
"state" : "translated",
"value" : "En ny version af {app_name} er tilgængelig."
}
},
"de" : {
"stringUnit" : {
"state" : "translated",
"value" : "Eine neue Version von {app_name} ist verfügbar."
}
},
"el" : {
"stringUnit" : {
"state" : "translated",
"value" : "Μια νέα έκδοση της εφαρμογής {app_name} είναι διαθέσιμη."
}
},
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "A new version of {app_name} is available."
}
},
"eo" : {
"stringUnit" : {
"state" : "translated",
"value" : "Nova versio de {app_name} disponeblas."
}
},
"es-419" : {
"stringUnit" : {
"state" : "translated",
"value" : "Hay una nueva versión de {app_name} disponible."
}
},
"es-ES" : {
"stringUnit" : {
"state" : "translated",
"value" : "Hay una nueva versión de {app_name} disponible."
}
},
"et" : {
"stringUnit" : {
"state" : "translated",
"value" : "Uus versioon {app_name} on saadaval."
}
},
"eu" : {
"stringUnit" : {
"state" : "translated",
"value" : "Bertsio berri bat erabilgarri dago {app_name}-erako."
}
},
"fa" : {
"stringUnit" : {
"state" : "translated",
"value" : "نسخه جدیدی از {app_name} موجود است."
}
},
"fi" : {
"stringUnit" : {
"state" : "translated",
"value" : "Uusi versio {app_name} on saatavilla."
}
},
"fil" : {
"stringUnit" : {
"state" : "translated",
"value" : "May bagong bersyon ng {app_name} na magagamit."
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Une nouvelle version de {app_name} est disponible."
}
},
"gl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Hai dispoñible unha nova versión de {app_name}."
}
},
"ha" : {
"stringUnit" : {
"state" : "translated",
"value" : "Sabuwar sigar {app_name} yana nan."
}
},
"he" : {
"stringUnit" : {
"state" : "translated",
"value" : "גרסה חדשה של {app_name} זמינה."
}
},
"hi" : {
"stringUnit" : {
"state" : "translated",
"value" : "{app_name} का एक नया संस्करण उपलब्ध है।"
}
},
"hr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Dostupna je nova verzija {app_name}."
}
},
"hu" : {
"stringUnit" : {
"state" : "translated",
"value" : "A(z) {app_name} új verziója elérhető."
}
},
"hy-AM" : {
"stringUnit" : {
"state" : "translated",
"value" : "Հասանելի է {app_name} նոր տարբերակը:"
}
},
"id" : {
"stringUnit" : {
"state" : "translated",
"value" : "Versi baru {app_name} telah tersedia."
}
},
"it" : {
"stringUnit" : {
"state" : "translated",
"value" : "È disponibile una nuova versione di {app_name}."
}
},
"ja" : {
"stringUnit" : {
"state" : "translated",
"value" : "新バージョンの {app_name} が利用可能です"
}
},
"ka" : {
"stringUnit" : {
"state" : "translated",
"value" : "{app_name}-ის ახალი ვერსია ხელმისაწვდომია."
}
},
"km" : {
"stringUnit" : {
"state" : "translated",
"value" : "កំណែថ្មីរបស់ {app_name} ចេញហើយ។"
}
},
"kn" : {
"stringUnit" : {
"state" : "translated",
"value" : "{app_name} ನ ಹೊಸ ಆವೃತ್ತಿ ಲಭ್ಯವಿದೆ."
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
"value" : "새 버전의 {app_name}이 사용 가능합니다."
}
},
"ku" : {
"stringUnit" : {
"state" : "translated",
"value" : "وەشانێکی نوێی {app_name} بەردەستە."
}
},
"ku-TR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Wêşaneke nû ya {app_name} berdeste."
}
},
"lg" : {
"stringUnit" : {
"state" : "translated",
"value" : "Enkyukakyuka empya ya {app_name} eriwo."
}
},
"lo" : {
"stringUnit" : {
"state" : "translated",
"value" : "ວິທີໃຫມ່ຂອງ {app_name} ມີໃຫ້."
}
},
"lt" : {
"stringUnit" : {
"state" : "translated",
"value" : "Yra prieinama nauja {app_name} versija."
}
},
"lv" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ir pieejama jauna {app_name} versija."
}
},
"mk" : {
"stringUnit" : {
"state" : "translated",
"value" : "Достапна е нова верзија на {app_name}."
}
},
"mn" : {
"stringUnit" : {
"state" : "translated",
"value" : "{app_name} шинэ хувилбар гарсан байна."
}
},
"ms" : {
"stringUnit" : {
"state" : "translated",
"value" : "Versi baru {app_name} tersedia."
}
},
"my" : {
"stringUnit" : {
"state" : "translated",
"value" : "{app_name} အသစ်ဗားရှင်း ရရှိနေပီး။"
}
},
"nb" : {
"stringUnit" : {
"state" : "translated",
"value" : "En ny versjon av {app_name} er tilgjengelig."
}
},
"nb-NO" : {
"stringUnit" : {
"state" : "translated",
"value" : "En ny versjon av {app_name} er tilgjengelig."
}
},
"ne-NP" : {
"stringUnit" : {
"state" : "translated",
"value" : "{app_name} को नयाँ संस्करण उपलब्ध छ।"
}
},
"nl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Er is een nieuwe versie van {app_name} beschikbaar."
}
},
"nn-NO" : {
"stringUnit" : {
"state" : "translated",
"value" : "Ein ny versjon av {app_name} er tilgjengelig."
}
},
"ny" : {
"stringUnit" : {
"state" : "translated",
"value" : "Mtundu watsopano wa {app_name} ulipezeka."
}
},
"pa-IN" : {
"stringUnit" : {
"state" : "translated",
"value" : "{app_name} ਦਾ ਨਵਾਂ ਵਰਜ਼ਨ ਉਪਲਬਧ ਹੈ।"
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Dostępna jest nowa wersja aplikacji {app_name}."
}
},
"ps" : {
"stringUnit" : {
"state" : "translated",
"value" : "د {app_name} نوې نسخه شتون لري."
}
},
"pt-BR" : {
"stringUnit" : {
"state" : "translated",
"value" : "Uma nova versão de {app_name} está disponível."
}
},
"pt-PT" : {
"stringUnit" : {
"state" : "translated",
"value" : "Uma nova versão de {app_name} está disponível."
}
},
"ro" : {
"stringUnit" : {
"state" : "translated",
"value" : "Este disponibilă o nouă versiune de {app_name}."
}
},
"ru" : {
"stringUnit" : {
"state" : "translated",
"value" : "Доступна новая версия {app_name}."
}
},
"sh" : {
"stringUnit" : {
"state" : "translated",
"value" : "Nova verzija {app_name} je dostupna."
}
},
"si-LK" : {
"stringUnit" : {
"state" : "translated",
"value" : "නව අනුවාදයක් {app_name} ලාබා ගත හැක."
}
},
"sk" : {
"stringUnit" : {
"state" : "translated",
"value" : "K dispozícii je nová verzia {app_name}."
}
},
"sl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Na voljo je nova različica {app_name}."
}
},
"sq" : {
"stringUnit" : {
"state" : "translated",
"value" : "Është gati një version i ri i {app_name}."
}
},
"sr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Нова верзија {app_name} је доступна."
}
},
"sr-Latn" : {
"stringUnit" : {
"state" : "translated",
"value" : "Nova verzija {app_name} je dostupna."
}
},
"sv-SE" : {
"stringUnit" : {
"state" : "translated",
"value" : "En ny version av {app_name} är tillgänglig."
}
},
"sw" : {
"stringUnit" : {
"state" : "translated",
"value" : "Toleo jipya la {app_name} linapatikana."
}
},
"ta" : {
"stringUnit" : {
"state" : "translated",
"value" : "{app_name} இன் புதிய பதிப்பு கிடைக்கிறது."
}
},
"te" : {
"stringUnit" : {
"state" : "translated",
"value" : "{app_name} యొక్క కొత్త సంస్కరణ అందుబాటులో ఉంది."
}
},
"th" : {
"stringUnit" : {
"state" : "translated",
"value" : "มีเวอร์ชั่นใหม่ของ {app_name} พร้อมใช้งาน"
}
},
"tr" : {
"stringUnit" : {
"state" : "translated",
"value" : "{app_name} yeni bir sürümü mevcut."
}
},
"uk" : {
"stringUnit" : {
"state" : "translated",
"value" : "Доступна нова версія {app_name}."
}
},
"ur-IN" : {
"stringUnit" : {
"state" : "translated",
"value" : "{app_name} کا ایک نیا ورژن دستیاب ہے۔"
}
},
"uz" : {
"stringUnit" : {
"state" : "translated",
"value" : "{app_name} ning yangi versiyasi mavjud."
}
},
"vi" : {
"stringUnit" : {
"state" : "translated",
"value" : "Một phiên bản mới của {app_name} đã có."
}
},
"xh" : {
"stringUnit" : {
"state" : "translated",
"value" : "Uhlobo olutsha lwe-{app_name} luyafumaneka."
}
},
"zh-CN" : {
"stringUnit" : {
"state" : "translated",
"value" : "有新版本的{app_name}可用。"
}
},
"zh-TW" : {
"stringUnit" : {
"state" : "translated",
"value" : "有新版本的 {app_name}。"
"value" : "A new version ({version}) of {app_name} is available."
}
}
}

@ -608,15 +608,8 @@ public extension LibSession {
// Only generate the push data if we need to do a push
guard config.needsPush else { return }
guard let data: PendingChanges.PushData = config.push(variant: info.variant) else {
throw LibSessionError(
config,
fallbackError: .unableToGeneratePushData,
logMessage: "Failed to generate push data for \(info.variant) config data, size: \(config.countDescription), error"
)
}
result.append(data: data)
// Try to generate the push data (will throw if there is an error)
try result.append(data: config.push(variant: info.variant))
}
}

@ -124,12 +124,22 @@ public extension LibSession {
// MARK: - Functions
func push(variant: ConfigDump.Variant) -> PendingChanges.PushData? {
func push(variant: ConfigDump.Variant) throws -> PendingChanges.PushData? {
switch self {
case .userProfile(let conf), .contacts(let conf),
.convoInfoVolatile(let conf), .userGroups(let conf),
.groupInfo(let conf), .groupMembers(let conf):
let cPushData: UnsafeMutablePointer<config_push_data> = config_push(conf)
/// The `config_push` function implicitly unwraps it's value but can throw internally so call it in a guard
/// statement to prevent the implicit unwrap from causing a crash (ideally it would return a standard optional
/// so the compiler would warn us but it's not that straight forward when dealing with C)
guard let cPushData: UnsafeMutablePointer<config_push_data> = config_push(conf) else {
throw LibSessionError(
self,
fallbackError: .unableToGeneratePushData,
logMessage: "Failed to generate push data for \(variant) config data, size: \(countDescription), error"
)
}
let pushData: Data = Data(
bytes: cPushData.pointee.config,
count: cPushData.pointee.config_len

Loading…
Cancel
Save