diff --git a/apps/ios/Shared/Model/AppAPITypes.swift b/apps/ios/Shared/Model/AppAPITypes.swift index 40b88ec338..db70511a5a 100644 --- a/apps/ios/Shared/Model/AppAPITypes.swift +++ b/apps/ios/Shared/Model/AppAPITypes.swift @@ -21,6 +21,7 @@ enum ChatCommand: ChatCmdProtocol { case apiSetUserContactReceipts(userId: Int64, userMsgReceiptSettings: UserMsgReceiptSettings) case apiSetUserGroupReceipts(userId: Int64, userMsgReceiptSettings: UserMsgReceiptSettings) case apiSetUserAutoAcceptMemberContacts(userId: Int64, enable: Bool) + case apiSetUserAutoAcceptGroupInvitations(userId: Int64, enable: Bool) case apiHideUser(userId: Int64, viewPwd: String) case apiUnhideUser(userId: Int64, viewPwd: String) case apiMuteUser(userId: Int64) @@ -215,6 +216,8 @@ enum ChatCommand: ChatCmdProtocol { return "/_set receipts groups \(userId) \(onOff(umrs.enable)) clear_overrides=\(onOff(umrs.clearOverrides))" case let .apiSetUserAutoAcceptMemberContacts(userId, enable): return "/_set accept member contacts \(userId) \(onOff(enable))" + case let .apiSetUserAutoAcceptGroupInvitations(userId, enable): + return "/_set accept group invitations \(userId) \(onOff(enable))" case let .apiHideUser(userId, viewPwd): return "/_hide user \(userId) \(encodeJSON(viewPwd))" case let .apiUnhideUser(userId, viewPwd): return "/_unhide user \(userId) \(encodeJSON(viewPwd))" case let .apiMuteUser(userId): return "/_mute user \(userId)" @@ -430,6 +433,7 @@ enum ChatCommand: ChatCmdProtocol { case .apiSetUserContactReceipts: return "apiSetUserContactReceipts" case .apiSetUserGroupReceipts: return "apiSetUserGroupReceipts" case .apiSetUserAutoAcceptMemberContacts: return "apiSetUserAutoAcceptMemberContacts" + case .apiSetUserAutoAcceptGroupInvitations: return "apiSetUserAutoAcceptGroupInvitations" case .apiHideUser: return "apiHideUser" case .apiUnhideUser: return "apiUnhideUser" case .apiMuteUser: return "apiMuteUser" diff --git a/apps/ios/Shared/Model/SimpleXAPI.swift b/apps/ios/Shared/Model/SimpleXAPI.swift index 7a934fc746..74f97134d7 100644 --- a/apps/ios/Shared/Model/SimpleXAPI.swift +++ b/apps/ios/Shared/Model/SimpleXAPI.swift @@ -302,6 +302,10 @@ func apiSetUserAutoAcceptMemberContacts(_ userId: Int64, enable: Bool) async thr try await sendCommandOkResp(.apiSetUserAutoAcceptMemberContacts(userId: userId, enable: enable)) } +func apiSetUserAutoAcceptGroupInvitations(_ userId: Int64, enable: Bool) async throws { + try await sendCommandOkResp(.apiSetUserAutoAcceptGroupInvitations(userId: userId, enable: enable)) +} + func apiHideUser(_ userId: Int64, viewPwd: String) async throws -> User { try await setUserPrivacy_(.apiHideUser(userId: userId, viewPwd: viewPwd)) } diff --git a/apps/ios/Shared/Views/UserSettings/PrivacySettings.swift b/apps/ios/Shared/Views/UserSettings/PrivacySettings.swift index d891efcd90..bf3dbac440 100644 --- a/apps/ios/Shared/Views/UserSettings/PrivacySettings.swift +++ b/apps/ios/Shared/Views/UserSettings/PrivacySettings.swift @@ -37,6 +37,8 @@ struct PrivacySettings: View { @State private var groupReceiptsDialogue = false @State private var autoAcceptMemberContacts = false @State private var autoAcceptMemberContactsReset = false + @State private var autoAcceptGroupInvitations = false + @State private var autoAcceptGroupInvitationsReset = false @State private var alert: PrivacySettingsViewAlert? enum PrivacySettingsViewAlert: Identifiable { @@ -117,14 +119,17 @@ struct PrivacySettings: View { } Section { - settingsRow("checkmark", color: theme.colors.secondary) { - Toggle("Auto-accept", isOn: $autoAcceptMemberContacts) + settingsRow("person", color: theme.colors.secondary) { + Toggle("Contact requests in groups", isOn: $autoAcceptMemberContacts) + } + settingsRow("person.2", color: theme.colors.secondary) { + Toggle("Group invitations", isOn: $autoAcceptGroupInvitations) } } header: { - Text("Contact requests from groups") + Text("Auto-accept") .foregroundColor(theme.colors.secondary) } footer: { - Text("This setting is for your current profile **\(m.currentUser?.displayName ?? "")**.") + Text("These settings are for your current profile **\(m.currentUser?.displayName ?? "")**.") .foregroundColor(theme.colors.secondary) } @@ -139,7 +144,14 @@ struct PrivacySettings: View { if autoAcceptMemberContactsReset { autoAcceptMemberContactsReset = false } else { - setAutoAcceptGrpDirectInvs(autoAcceptMemberContacts) + setAutoAcceptMemberContacts(autoAcceptMemberContacts) + } + } + .onChange(of: autoAcceptGroupInvitations) { _ in + if autoAcceptGroupInvitationsReset { + autoAcceptGroupInvitationsReset = false + } else { + setAutoAcceptGroupInvitations(autoAcceptGroupInvitations) } } .onAppear { @@ -148,6 +160,10 @@ struct PrivacySettings: View { autoAcceptMemberContactsReset = true autoAcceptMemberContacts = u.autoAcceptMemberContacts } + if autoAcceptGroupInvitations != u.autoAcceptGroupInvitations { + autoAcceptGroupInvitationsReset = true + autoAcceptGroupInvitations = u.autoAcceptGroupInvitations + } } } .alert(item: $alert) { alert in @@ -426,7 +442,7 @@ struct PrivacySettings: View { } } - private func setAutoAcceptGrpDirectInvs(_ enable: Bool) { + private func setAutoAcceptMemberContacts(_ enable: Bool) { Task { do { if let currentUser = m.currentUser { @@ -443,6 +459,23 @@ struct PrivacySettings: View { } } + private func setAutoAcceptGroupInvitations(_ enable: Bool) { + Task { + do { + if let currentUser = m.currentUser { + try await apiSetUserAutoAcceptGroupInvitations(currentUser.userId, enable: enable) + await MainActor.run { + var updatedUser = currentUser + updatedUser.autoAcceptGroupInvitations = enable + m.updateUser(updatedUser) + } + } + } catch let error { + alert = .error(title: "Error setting auto-accept", error: "Error: \(responseError(error))") + } + } + } + private func simplexLockRow(_ value: LocalizedStringKey) -> some View { HStack { Text("SimpleX Lock") diff --git a/apps/ios/SimpleX Localizations/bg.xcloc/Localized Contents/bg.xliff b/apps/ios/SimpleX Localizations/bg.xcloc/Localized Contents/bg.xliff index 0b7e24f040..ff99155cb9 100644 --- a/apps/ios/SimpleX Localizations/bg.xcloc/Localized Contents/bg.xliff +++ b/apps/ios/SimpleX Localizations/bg.xcloc/Localized Contents/bg.xliff @@ -2,7 +2,7 @@
- +
@@ -2429,8 +2429,8 @@ This is your own one-time link! Настройки за контакт No comment provided by engineer. - - Contact requests from groups + + Contact requests in groups No comment provided by engineer. @@ -2603,6 +2603,14 @@ This is your own one-time link! Линкът се създава… No comment provided by engineer. + + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode Текущ kод за достъп @@ -4500,6 +4508,10 @@ Error: %2$@ Груповата покана вече е невалидна, премахната е от подателя. No comment provided by engineer. + + Group invitations + No comment provided by engineer. + Group link Групов линк @@ -8989,10 +9001,6 @@ alert subtitle Тази настройка се прилага за съобщения в текущия ви профил **%@**. No comment provided by engineer. - - This setting is for your current profile **%@**. - No comment provided by engineer. - Time to disappear is set only for new contacts. No comment provided by engineer. @@ -9938,6 +9946,14 @@ Repeat join request? Вече можете да изпращате съобщения до %@ notification body + + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. No comment provided by engineer. @@ -11437,7 +11453,7 @@ last received msg: %2$@
- +
@@ -11474,7 +11490,7 @@ last received msg: %2$@
- +
@@ -11489,7 +11505,7 @@ last received msg: %2$@
- +
@@ -11511,7 +11527,7 @@ last received msg: %2$@
- +
@@ -11538,7 +11554,7 @@ last received msg: %2$@
- +
@@ -11557,7 +11573,7 @@ last received msg: %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/bg.xcloc/contents.json b/apps/ios/SimpleX Localizations/bg.xcloc/contents.json index 21627f8e60..93b8194a0d 100644 --- a/apps/ios/SimpleX Localizations/bg.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/bg.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "bg", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleX Localizations/cs.xcloc/Localized Contents/cs.xliff b/apps/ios/SimpleX Localizations/cs.xcloc/Localized Contents/cs.xliff index 0549fdc20b..9f11be073f 100644 --- a/apps/ios/SimpleX Localizations/cs.xcloc/Localized Contents/cs.xliff +++ b/apps/ios/SimpleX Localizations/cs.xcloc/Localized Contents/cs.xliff @@ -2,7 +2,7 @@
- +
@@ -2333,8 +2333,8 @@ Toto je váš vlastní jednorázový odkaz! Předvolby kontaktů No comment provided by engineer. - - Contact requests from groups + + Contact requests in groups No comment provided by engineer. @@ -2499,6 +2499,14 @@ Toto je váš vlastní jednorázový odkaz! Creating link… No comment provided by engineer. + + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode Aktuální heslo @@ -4352,6 +4360,10 @@ Error: %2$@ Skupinová pozvánka již není platná, byla odstraněna odesílatelem. No comment provided by engineer. + + Group invitations + No comment provided by engineer. + Group link Odkaz na skupinu @@ -8748,10 +8760,6 @@ alert subtitle Toto nastavení platí pro zprávy ve vašem aktuálním profilu chatu **%@**. No comment provided by engineer. - - This setting is for your current profile **%@**. - No comment provided by engineer. - Time to disappear is set only for new contacts. No comment provided by engineer. @@ -9655,6 +9663,14 @@ Repeat join request? Nyní můžete posílat zprávy %@ notification body + + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. No comment provided by engineer. @@ -11124,7 +11140,7 @@ last received msg: %2$@
- +
@@ -11160,7 +11176,7 @@ last received msg: %2$@
- +
@@ -11175,7 +11191,7 @@ last received msg: %2$@
- +
@@ -11197,7 +11213,7 @@ last received msg: %2$@
- +
@@ -11224,7 +11240,7 @@ last received msg: %2$@
- +
@@ -11243,7 +11259,7 @@ last received msg: %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/cs.xcloc/contents.json b/apps/ios/SimpleX Localizations/cs.xcloc/contents.json index 804a5e0951..61a2dc8bb8 100644 --- a/apps/ios/SimpleX Localizations/cs.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/cs.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "cs", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleX Localizations/de.xcloc/Localized Contents/de.xliff b/apps/ios/SimpleX Localizations/de.xcloc/Localized Contents/de.xliff index 6fd8232e93..a63c97fb8b 100644 --- a/apps/ios/SimpleX Localizations/de.xcloc/Localized Contents/de.xliff +++ b/apps/ios/SimpleX Localizations/de.xcloc/Localized Contents/de.xliff @@ -2,7 +2,7 @@
- +
@@ -2525,8 +2525,8 @@ Das ist Ihr eigener Einmal-Link! Kontakt-Präferenzen No comment provided by engineer. - - Contact requests from groups + + Contact requests in groups KONTAKTANFRAGEN VON GRUPPEN No comment provided by engineer. @@ -2715,6 +2715,14 @@ Das ist Ihr eigener Einmal-Link! Link wird erstellt… No comment provided by engineer. + + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode Aktueller Zugangscode @@ -4770,6 +4778,10 @@ Fehler: %2$@ Die Gruppeneinladung ist nicht mehr gültig, da sie vom Absender entfernt wurde. No comment provided by engineer. + + Group invitations + No comment provided by engineer. + Group link Gruppen-Link @@ -9734,11 +9746,6 @@ alert subtitle Diese Einstellung gilt für Nachrichten in Ihrem aktuellen Chat-Profil **%@**. No comment provided by engineer. - - This setting is for your current profile **%@**. - Diese Einstellung gilt für Ihr aktuelles Profil **%@**. - No comment provided by engineer. - Time to disappear is set only for new contacts. Die Zeit bis zum Verschwinden wird nur für neue Kontakte eingestellt. @@ -10769,6 +10776,14 @@ Verbindungsanfrage wiederholen? Sie können nun Nachrichten an %@ versenden notification body + + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. Sie können aus den archivierten Kontakten heraus Nachrichten an %@ versenden. @@ -12374,7 +12389,7 @@ Zuletzt empfangene Nachricht: %2$@
- +
@@ -12411,7 +12426,7 @@ Zuletzt empfangene Nachricht: %2$@
- +
@@ -12426,7 +12441,7 @@ Zuletzt empfangene Nachricht: %2$@
- +
@@ -12448,7 +12463,7 @@ Zuletzt empfangene Nachricht: %2$@
- +
@@ -12480,7 +12495,7 @@ Zuletzt empfangene Nachricht: %2$@
- +
@@ -12502,7 +12517,7 @@ Zuletzt empfangene Nachricht: %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/de.xcloc/contents.json b/apps/ios/SimpleX Localizations/de.xcloc/contents.json index 8a5b0f6b96..e49b3da67c 100644 --- a/apps/ios/SimpleX Localizations/de.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/de.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "de", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleX Localizations/en.xcloc/Localized Contents/en.xliff b/apps/ios/SimpleX Localizations/en.xcloc/Localized Contents/en.xliff index 97a8d4879c..88f9cb0f74 100644 --- a/apps/ios/SimpleX Localizations/en.xcloc/Localized Contents/en.xliff +++ b/apps/ios/SimpleX Localizations/en.xcloc/Localized Contents/en.xliff @@ -2,7 +2,7 @@
- +
@@ -2525,9 +2525,9 @@ This is your own one-time link! Contact preferences No comment provided by engineer. - - Contact requests from groups - Contact requests from groups + + Contact requests in groups + Contact requests in groups No comment provided by engineer. @@ -2715,6 +2715,16 @@ This is your own one-time link! Creating link… No comment provided by engineer. + + Crowdfunding on Wefunder + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode Current Passcode @@ -4770,6 +4780,11 @@ Error: %2$@ Group invitation is no longer valid, it was removed by sender. No comment provided by engineer. + + Group invitations + Group invitations + No comment provided by engineer. + Group link Group link @@ -9734,11 +9749,6 @@ alert subtitle This setting applies to messages in your current chat profile **%@**. No comment provided by engineer. - - This setting is for your current profile **%@**. - This setting is for your current profile **%@**. - No comment provided by engineer. - Time to disappear is set only for new contacts. Time to disappear is set only for new contacts. @@ -10769,6 +10779,16 @@ Repeat join request? You can now chat with %@ notification body + + You can now invest in SimpleX Chat + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. You can send messages to %@ from Archived contacts. @@ -12374,7 +12394,7 @@ last received msg: %2$@
- +
@@ -12411,7 +12431,7 @@ last received msg: %2$@
- +
@@ -12428,7 +12448,7 @@ last received msg: %2$@
- +
@@ -12450,7 +12470,7 @@ last received msg: %2$@
- +
@@ -12482,7 +12502,7 @@ last received msg: %2$@
- +
@@ -12504,7 +12524,7 @@ last received msg: %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/en.xcloc/contents.json b/apps/ios/SimpleX Localizations/en.xcloc/contents.json index 7b50cab8e7..5426843b95 100644 --- a/apps/ios/SimpleX Localizations/en.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/en.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "en", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleX Localizations/es.xcloc/Localized Contents/es.xliff b/apps/ios/SimpleX Localizations/es.xcloc/Localized Contents/es.xliff index 6d140c7f78..8f613b0a8b 100644 --- a/apps/ios/SimpleX Localizations/es.xcloc/Localized Contents/es.xliff +++ b/apps/ios/SimpleX Localizations/es.xcloc/Localized Contents/es.xliff @@ -2,7 +2,7 @@
- +
@@ -2525,8 +2525,8 @@ This is your own one-time link! Preferencias de contacto No comment provided by engineer. - - Contact requests from groups + + Contact requests in groups Solicitudes de contacto en grupo No comment provided by engineer. @@ -2715,6 +2715,14 @@ This is your own one-time link! Creando enlace… No comment provided by engineer. + + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode Código de Acceso @@ -4770,6 +4778,10 @@ Error: %2$@ La invitación al grupo ya no es válida, ha sido eliminada por el remitente. No comment provided by engineer. + + Group invitations + No comment provided by engineer. + Group link Enlace de grupo @@ -9734,11 +9746,6 @@ alert subtitle Esta configuración se aplica a los mensajes del perfil actual **%@**. No comment provided by engineer. - - This setting is for your current profile **%@**. - Esta configuración se aplica al perfil actual **%@**. - No comment provided by engineer. - Time to disappear is set only for new contacts. Mensajes temporales activados sólo para los contactos nuevos. @@ -10769,6 +10776,14 @@ Repeat join request? Ya puedes chatear con %@ notification body + + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. Puedes enviar mensajes a %@ desde Contactos archivados. @@ -12374,7 +12389,7 @@ last received msg: %2$@
- +
@@ -12411,7 +12426,7 @@ last received msg: %2$@
- +
@@ -12426,7 +12441,7 @@ last received msg: %2$@
- +
@@ -12448,7 +12463,7 @@ last received msg: %2$@
- +
@@ -12480,7 +12495,7 @@ last received msg: %2$@
- +
@@ -12502,7 +12517,7 @@ last received msg: %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/es.xcloc/contents.json b/apps/ios/SimpleX Localizations/es.xcloc/contents.json index 5a4c833adf..13dd145937 100644 --- a/apps/ios/SimpleX Localizations/es.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/es.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "es", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleX Localizations/fi.xcloc/Localized Contents/fi.xliff b/apps/ios/SimpleX Localizations/fi.xcloc/Localized Contents/fi.xliff index cd6030b2be..2721c64ffd 100644 --- a/apps/ios/SimpleX Localizations/fi.xcloc/Localized Contents/fi.xliff +++ b/apps/ios/SimpleX Localizations/fi.xcloc/Localized Contents/fi.xliff @@ -2,7 +2,7 @@
- +
@@ -2220,8 +2220,8 @@ This is your own one-time link! Kontaktin asetukset No comment provided by engineer. - - Contact requests from groups + + Contact requests in groups No comment provided by engineer. @@ -2386,6 +2386,14 @@ This is your own one-time link! Creating link… No comment provided by engineer. + + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode Nykyinen pääsykoodi @@ -4236,6 +4244,10 @@ Error: %2$@ Ryhmäkutsu ei ole enää voimassa, lähettäjä poisti sen. No comment provided by engineer. + + Group invitations + No comment provided by engineer. + Group link Ryhmälinkki @@ -8623,10 +8635,6 @@ alert subtitle Tämä asetus koskee nykyisen keskusteluprofiilisi viestejä *%@**. No comment provided by engineer. - - This setting is for your current profile **%@**. - No comment provided by engineer. - Time to disappear is set only for new contacts. No comment provided by engineer. @@ -9529,6 +9537,14 @@ Repeat join request? Voit nyt lähettää viestejä %@:lle notification body + + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. No comment provided by engineer. @@ -10996,7 +11012,7 @@ last received msg: %2$@
- +
@@ -11032,7 +11048,7 @@ last received msg: %2$@
- +
@@ -11047,7 +11063,7 @@ last received msg: %2$@
- +
@@ -11069,7 +11085,7 @@ last received msg: %2$@
- +
@@ -11096,7 +11112,7 @@ last received msg: %2$@
- +
@@ -11115,7 +11131,7 @@ last received msg: %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/fi.xcloc/contents.json b/apps/ios/SimpleX Localizations/fi.xcloc/contents.json index f61becaece..c46a7251f5 100644 --- a/apps/ios/SimpleX Localizations/fi.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/fi.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "fi", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleX Localizations/fr.xcloc/Localized Contents/fr.xliff b/apps/ios/SimpleX Localizations/fr.xcloc/Localized Contents/fr.xliff index cf8eafaac6..ad7625d0f6 100644 --- a/apps/ios/SimpleX Localizations/fr.xcloc/Localized Contents/fr.xliff +++ b/apps/ios/SimpleX Localizations/fr.xcloc/Localized Contents/fr.xliff @@ -2,7 +2,7 @@
- +
@@ -2503,8 +2503,8 @@ Il s'agit de votre propre lien unique ! Préférences de contact No comment provided by engineer. - - Contact requests from groups + + Contact requests in groups Demandes de contact des groupes No comment provided by engineer. @@ -2691,6 +2691,14 @@ Il s'agit de votre propre lien unique ! Création d'un lien… No comment provided by engineer. + + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode Code d'accès actuel @@ -4733,6 +4741,10 @@ Erreur : %2$@ L'invitation du groupe n'est plus valide, elle a été supprimé par l'expéditeur. No comment provided by engineer. + + Group invitations + No comment provided by engineer. + Group link Lien du groupe @@ -9609,10 +9621,6 @@ alert subtitle Ce paramètre s'applique aux messages de votre profil de chat actuel **%@**. No comment provided by engineer. - - This setting is for your current profile **%@**. - No comment provided by engineer. - Time to disappear is set only for new contacts. Le délai de disparition est défini seulement pour les nouveaux contacts. @@ -10608,6 +10616,14 @@ Répéter la demande d'adhésion ? Vous pouvez maintenant envoyer des messages à %@ notification body + + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. Vous pouvez envoyer des messages à %@ à partir des contacts archivés. @@ -12181,7 +12197,7 @@ dernier message reçu : %2$@
- +
@@ -12218,7 +12234,7 @@ dernier message reçu : %2$@
- +
@@ -12233,7 +12249,7 @@ dernier message reçu : %2$@
- +
@@ -12255,7 +12271,7 @@ dernier message reçu : %2$@
- +
@@ -12287,7 +12303,7 @@ dernier message reçu : %2$@
- +
@@ -12309,7 +12325,7 @@ dernier message reçu : %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/fr.xcloc/contents.json b/apps/ios/SimpleX Localizations/fr.xcloc/contents.json index f41d7b4888..8529eeed82 100644 --- a/apps/ios/SimpleX Localizations/fr.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/fr.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "fr", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleX Localizations/hu.xcloc/Localized Contents/hu.xliff b/apps/ios/SimpleX Localizations/hu.xcloc/Localized Contents/hu.xliff index b3facbe03e..51eb11f548 100644 --- a/apps/ios/SimpleX Localizations/hu.xcloc/Localized Contents/hu.xliff +++ b/apps/ios/SimpleX Localizations/hu.xcloc/Localized Contents/hu.xliff @@ -2,7 +2,7 @@
- +
@@ -2525,8 +2525,8 @@ Ez a saját egyszer használható meghívója! Partnerbeállítások No comment provided by engineer. - - Contact requests from groups + + Contact requests in groups Partneri kapcsolatkérések a csoportokból No comment provided by engineer. @@ -2715,6 +2715,14 @@ Ez a saját egyszer használható meghívója! Hivatkozás létrehozása… No comment provided by engineer. + + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode Jelenlegi jelkód @@ -4770,6 +4778,10 @@ Hiba: %2$@ A csoportmeghívó már nem érvényes, a küldője eltávolította. No comment provided by engineer. + + Group invitations + No comment provided by engineer. + Group link Csoporthivatkozás @@ -9734,11 +9746,6 @@ alert subtitle Ez a beállítás csak az Ön jelenlegi **%@** nevű csevegési profiljában lévő üzenetekre vonatkozik. No comment provided by engineer. - - This setting is for your current profile **%@**. - Ez a beállítás csak a jelenlegi **%@** nevű csevegési profiljára vonatkozik. - No comment provided by engineer. - Time to disappear is set only for new contacts. Az üzeneteltűnési idő csak az új partnerekre vonatkozik. @@ -10769,6 +10776,14 @@ Megismétli a csatlakozási kérést? Mostantól küldhet üzeneteket %@ számára notification body + + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. Az „Archivált partnerekből” továbbra is küldhet üzeneteket neki: %@. @@ -12374,7 +12389,7 @@ utoljára fogadott üzenet: %2$@
- +
@@ -12411,7 +12426,7 @@ utoljára fogadott üzenet: %2$@
- +
@@ -12426,7 +12441,7 @@ utoljára fogadott üzenet: %2$@
- +
@@ -12448,7 +12463,7 @@ utoljára fogadott üzenet: %2$@
- +
@@ -12480,7 +12495,7 @@ utoljára fogadott üzenet: %2$@
- +
@@ -12502,7 +12517,7 @@ utoljára fogadott üzenet: %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/hu.xcloc/contents.json b/apps/ios/SimpleX Localizations/hu.xcloc/contents.json index 31997434c3..23d2f9c992 100644 --- a/apps/ios/SimpleX Localizations/hu.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/hu.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "hu", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleX Localizations/it.xcloc/Localized Contents/it.xliff b/apps/ios/SimpleX Localizations/it.xcloc/Localized Contents/it.xliff index 5381b8cbb5..bc7be9498a 100644 --- a/apps/ios/SimpleX Localizations/it.xcloc/Localized Contents/it.xliff +++ b/apps/ios/SimpleX Localizations/it.xcloc/Localized Contents/it.xliff @@ -2,7 +2,7 @@
- +
@@ -2525,8 +2525,8 @@ Questo è il tuo link una tantum! Preferenze del contatto No comment provided by engineer. - - Contact requests from groups + + Contact requests in groups Richieste di contatto dai gruppi No comment provided by engineer. @@ -2715,6 +2715,14 @@ Questo è il tuo link una tantum! Creazione link… No comment provided by engineer. + + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode Codice di accesso attuale @@ -4770,6 +4778,10 @@ Errore: %2$@ L'invito al gruppo non è più valido, è stato rimosso dal mittente. No comment provided by engineer. + + Group invitations + No comment provided by engineer. + Group link Link del gruppo @@ -9734,11 +9746,6 @@ alert subtitle Questa impostazione si applica ai messaggi del profilo di chat attuale **%@**. No comment provided by engineer. - - This setting is for your current profile **%@**. - Questa impostazione è per il tuo profilo attuale **%@**. - No comment provided by engineer. - Time to disappear is set only for new contacts. Il tempo di scomparsa è impostato solo per i contatti nuovi. @@ -10769,6 +10776,14 @@ Ripetere la richiesta di ingresso? Ora puoi inviare messaggi a %@ notification body + + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. Puoi inviare messaggi a %@ dai contatti archiviati. @@ -12374,7 +12389,7 @@ ultimo msg ricevuto: %2$@
- +
@@ -12411,7 +12426,7 @@ ultimo msg ricevuto: %2$@
- +
@@ -12426,7 +12441,7 @@ ultimo msg ricevuto: %2$@
- +
@@ -12448,7 +12463,7 @@ ultimo msg ricevuto: %2$@
- +
@@ -12480,7 +12495,7 @@ ultimo msg ricevuto: %2$@
- +
@@ -12502,7 +12517,7 @@ ultimo msg ricevuto: %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/it.xcloc/contents.json b/apps/ios/SimpleX Localizations/it.xcloc/contents.json index 36fd18d76d..5862575e41 100644 --- a/apps/ios/SimpleX Localizations/it.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/it.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "it", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleX Localizations/ja.xcloc/Localized Contents/ja.xliff b/apps/ios/SimpleX Localizations/ja.xcloc/Localized Contents/ja.xliff index c8b2285649..5f43fbade6 100644 --- a/apps/ios/SimpleX Localizations/ja.xcloc/Localized Contents/ja.xliff +++ b/apps/ios/SimpleX Localizations/ja.xcloc/Localized Contents/ja.xliff @@ -2,7 +2,7 @@
- +
@@ -2325,8 +2325,8 @@ This is your own one-time link! 連絡先の設定 No comment provided by engineer. - - Contact requests from groups + + Contact requests in groups No comment provided by engineer. @@ -2491,6 +2491,14 @@ This is your own one-time link! Creating link… No comment provided by engineer. + + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode 現在のパスコード @@ -4353,6 +4361,10 @@ Error: %2$@ グループ招待が無効となり、送信元によって取り消されました。 No comment provided by engineer. + + Group invitations + No comment provided by engineer. + Group link グループのリンク @@ -8736,10 +8748,6 @@ alert subtitle この設定は現在のチャットプロフィール **%@** のメッセージに適用されます。 No comment provided by engineer. - - This setting is for your current profile **%@**. - No comment provided by engineer. - Time to disappear is set only for new contacts. No comment provided by engineer. @@ -9643,6 +9651,14 @@ Repeat join request? %@ にメッセージを送信できるようになりました notification body + + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. No comment provided by engineer. @@ -11111,7 +11127,7 @@ last received msg: %2$@
- +
@@ -11147,7 +11163,7 @@ last received msg: %2$@
- +
@@ -11162,7 +11178,7 @@ last received msg: %2$@
- +
@@ -11184,7 +11200,7 @@ last received msg: %2$@
- +
@@ -11211,7 +11227,7 @@ last received msg: %2$@
- +
@@ -11230,7 +11246,7 @@ last received msg: %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/ja.xcloc/contents.json b/apps/ios/SimpleX Localizations/ja.xcloc/contents.json index f52b6f4654..095625fb0f 100644 --- a/apps/ios/SimpleX Localizations/ja.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/ja.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "ja", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleX Localizations/nl.xcloc/Localized Contents/nl.xliff b/apps/ios/SimpleX Localizations/nl.xcloc/Localized Contents/nl.xliff index 11f81cf90b..7cbb9dbc6a 100644 --- a/apps/ios/SimpleX Localizations/nl.xcloc/Localized Contents/nl.xliff +++ b/apps/ios/SimpleX Localizations/nl.xcloc/Localized Contents/nl.xliff @@ -2,7 +2,7 @@
- +
@@ -2422,8 +2422,8 @@ Dit is uw eigen eenmalige link! Contact voorkeuren No comment provided by engineer. - - Contact requests from groups + + Contact requests in groups No comment provided by engineer. @@ -2603,6 +2603,14 @@ Dit is uw eigen eenmalige link! Link maken… No comment provided by engineer. + + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode Huidige toegangscode @@ -4605,6 +4613,10 @@ Fout: %2$@ Groep uitnodiging is niet meer geldig, deze is verwijderd door de afzender. No comment provided by engineer. + + Group invitations + No comment provided by engineer. + Group link Groep link @@ -9353,10 +9365,6 @@ alert subtitle Deze instelling is van toepassing op berichten in je huidige chatprofiel **%@**. No comment provided by engineer. - - This setting is for your current profile **%@**. - No comment provided by engineer. - Time to disappear is set only for new contacts. No comment provided by engineer. @@ -10349,6 +10357,14 @@ Deelnameverzoek herhalen? Je kunt nu berichten sturen naar %@ notification body + + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. U kunt berichten naar %@ sturen vanuit gearchiveerde contacten. @@ -11903,7 +11919,7 @@ laatst ontvangen bericht: %2$@
- +
@@ -11940,7 +11956,7 @@ laatst ontvangen bericht: %2$@
- +
@@ -11955,7 +11971,7 @@ laatst ontvangen bericht: %2$@
- +
@@ -11977,7 +11993,7 @@ laatst ontvangen bericht: %2$@
- +
@@ -12009,7 +12025,7 @@ laatst ontvangen bericht: %2$@
- +
@@ -12031,7 +12047,7 @@ laatst ontvangen bericht: %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/nl.xcloc/contents.json b/apps/ios/SimpleX Localizations/nl.xcloc/contents.json index 36c6d27526..d2b453a7c5 100644 --- a/apps/ios/SimpleX Localizations/nl.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/nl.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "nl", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleX Localizations/pl.xcloc/Localized Contents/pl.xliff b/apps/ios/SimpleX Localizations/pl.xcloc/Localized Contents/pl.xliff index 19401459d5..e483c8686c 100644 --- a/apps/ios/SimpleX Localizations/pl.xcloc/Localized Contents/pl.xliff +++ b/apps/ios/SimpleX Localizations/pl.xcloc/Localized Contents/pl.xliff @@ -2,7 +2,7 @@
- +
@@ -2439,8 +2439,8 @@ To jest twój jednorazowy link! Preferencje kontaktu No comment provided by engineer. - - Contact requests from groups + + Contact requests in groups Prośby o kontakt od grup No comment provided by engineer. @@ -2622,6 +2622,14 @@ To jest twój jednorazowy link! Tworzenie linku… No comment provided by engineer. + + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode Aktualny Pin @@ -4641,6 +4649,10 @@ Błąd: %2$@ Zaproszenie do grupy jest już nieważne, zostało usunięte przez nadawcę. No comment provided by engineer. + + Group invitations + No comment provided by engineer. + Group link Link do grupy @@ -9449,11 +9461,6 @@ alert subtitle To ustawienie dotyczy wiadomości Twojego bieżącego profilu czatu **%@**. No comment provided by engineer. - - This setting is for your current profile **%@**. - To ustawienie jest dla Twojego obecnego profilu **%@**. - No comment provided by engineer. - Time to disappear is set only for new contacts. Czas zniknięcia jest ustawiony tylko dla nowych kontaktów. @@ -10461,6 +10468,14 @@ Powtórzyć prośbę dołączenia? Możesz teraz wysyłać wiadomości do %@ notification body + + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. Możesz wysyłać wiadomości do %@ ze zarchiwizowanych kontaktów. @@ -12029,7 +12044,7 @@ ostatnia otrzymana wiadomość: %2$@
- +
@@ -12066,7 +12081,7 @@ ostatnia otrzymana wiadomość: %2$@
- +
@@ -12081,7 +12096,7 @@ ostatnia otrzymana wiadomość: %2$@
- +
@@ -12103,7 +12118,7 @@ ostatnia otrzymana wiadomość: %2$@
- +
@@ -12135,7 +12150,7 @@ ostatnia otrzymana wiadomość: %2$@
- +
@@ -12157,7 +12172,7 @@ ostatnia otrzymana wiadomość: %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/pl.xcloc/contents.json b/apps/ios/SimpleX Localizations/pl.xcloc/contents.json index 2f5237052c..bf3e16596b 100644 --- a/apps/ios/SimpleX Localizations/pl.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/pl.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "pl", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleX Localizations/ru.xcloc/Localized Contents/ru.xliff b/apps/ios/SimpleX Localizations/ru.xcloc/Localized Contents/ru.xliff index 7254d80c9c..1942b9c0aa 100644 --- a/apps/ios/SimpleX Localizations/ru.xcloc/Localized Contents/ru.xliff +++ b/apps/ios/SimpleX Localizations/ru.xcloc/Localized Contents/ru.xliff @@ -2,7 +2,7 @@
- +
@@ -2525,8 +2525,8 @@ This is your own one-time link! Предпочтения контакта No comment provided by engineer. - - Contact requests from groups + + Contact requests in groups Запросы на соединение из групп No comment provided by engineer. @@ -2715,6 +2715,14 @@ This is your own one-time link! Создаётся ссылка… No comment provided by engineer. + + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode Текущий Код @@ -4770,6 +4778,10 @@ Error: %2$@ Приглашение в группу больше не действительно, оно было удалено отправителем. No comment provided by engineer. + + Group invitations + No comment provided by engineer. + Group link Ссылка группы @@ -9733,11 +9745,6 @@ alert subtitle Эта настройка применяется к сообщениям в Вашем текущем профиле чата **%@**. No comment provided by engineer. - - This setting is for your current profile **%@**. - Эта настройка применяется к Вашему текущему профилю чата **%@**. - No comment provided by engineer. - Time to disappear is set only for new contacts. Время удаления устанавливается только для новых контактов. @@ -10768,6 +10775,14 @@ Repeat join request? Вы теперь можете общаться с %@ notification body + + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. Вы можете отправлять сообщения %@ из Архивированных контактов. @@ -12373,7 +12388,7 @@ last received msg: %2$@
- +
@@ -12410,7 +12425,7 @@ last received msg: %2$@
- +
@@ -12425,7 +12440,7 @@ last received msg: %2$@
- +
@@ -12447,7 +12462,7 @@ last received msg: %2$@
- +
@@ -12479,7 +12494,7 @@ last received msg: %2$@
- +
@@ -12501,7 +12516,7 @@ last received msg: %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/ru.xcloc/contents.json b/apps/ios/SimpleX Localizations/ru.xcloc/contents.json index 9907ddc7fc..996db14639 100644 --- a/apps/ios/SimpleX Localizations/ru.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/ru.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "ru", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleX Localizations/th.xcloc/Localized Contents/th.xliff b/apps/ios/SimpleX Localizations/th.xcloc/Localized Contents/th.xliff index 20dec9b68d..28332012c4 100644 --- a/apps/ios/SimpleX Localizations/th.xcloc/Localized Contents/th.xliff +++ b/apps/ios/SimpleX Localizations/th.xcloc/Localized Contents/th.xliff @@ -2,7 +2,7 @@
- +
@@ -2211,8 +2211,8 @@ This is your own one-time link! การกําหนดลักษณะการติดต่อ No comment provided by engineer. - - Contact requests from groups + + Contact requests in groups No comment provided by engineer. @@ -2375,6 +2375,14 @@ This is your own one-time link! Creating link… No comment provided by engineer. + + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode รหัสผ่านปัจจุบัน @@ -4221,6 +4229,10 @@ Error: %2$@ คำเชิญเข้าร่วมกลุ่มใช้ไม่ถูกต้องอีกต่อไป คำเชิญถูกลบโดยผู้ส่ง No comment provided by engineer. + + Group invitations + No comment provided by engineer. + Group link ลิงค์กลุ่ม @@ -8593,10 +8605,6 @@ alert subtitle การตั้งค่านี้ใช้กับข้อความในโปรไฟล์แชทปัจจุบันของคุณ **%@** No comment provided by engineer. - - This setting is for your current profile **%@**. - No comment provided by engineer. - Time to disappear is set only for new contacts. No comment provided by engineer. @@ -9497,6 +9505,14 @@ Repeat join request? ตอนนี้คุณสามารถส่งข้อความถึง %@ notification body + + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. No comment provided by engineer. @@ -10961,7 +10977,7 @@ last received msg: %2$@
- +
@@ -10997,7 +11013,7 @@ last received msg: %2$@
- +
@@ -11012,7 +11028,7 @@ last received msg: %2$@
- +
@@ -11034,7 +11050,7 @@ last received msg: %2$@
- +
@@ -11061,7 +11077,7 @@ last received msg: %2$@
- +
@@ -11080,7 +11096,7 @@ last received msg: %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/th.xcloc/contents.json b/apps/ios/SimpleX Localizations/th.xcloc/contents.json index a18ced87af..f01660f74f 100644 --- a/apps/ios/SimpleX Localizations/th.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/th.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "th", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleX Localizations/tr.xcloc/Localized Contents/tr.xliff b/apps/ios/SimpleX Localizations/tr.xcloc/Localized Contents/tr.xliff index 00385e5312..62df79c62b 100644 --- a/apps/ios/SimpleX Localizations/tr.xcloc/Localized Contents/tr.xliff +++ b/apps/ios/SimpleX Localizations/tr.xcloc/Localized Contents/tr.xliff @@ -2,7 +2,7 @@
- +
@@ -2450,8 +2450,8 @@ Bu senin kendi tek kullanımlık bağlantın! Kişi tercihleri No comment provided by engineer. - - Contact requests from groups + + Contact requests in groups Gruplardan gelen iletişim talepleri No comment provided by engineer. @@ -2633,6 +2633,14 @@ Bu senin kendi tek kullanımlık bağlantın! Link oluşturuluyor… No comment provided by engineer. + + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode Şu anki şifre @@ -4644,6 +4652,10 @@ Hata: %2$@ Grup davet artık geçerli değil, gönderici tarafından silindi. No comment provided by engineer. + + Group invitations + No comment provided by engineer. + Group link Grup bağlantısı @@ -9436,11 +9448,6 @@ alert subtitle Bu ayar, geçerli sohbet profiliniz **%@** deki mesajlara uygulanır. No comment provided by engineer. - - This setting is for your current profile **%@**. - Bu ayar, mevcut profiliniz içindir. - No comment provided by engineer. - Time to disappear is set only for new contacts. Kaybolma süresi yalnızca yeni kişiler için ayarlanır. @@ -10444,6 +10451,14 @@ Katılma isteği tekrarlansın mı? Artık %@ adresine mesaj gönderebilirsin notification body + + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. Arşivlenen kişilerden %@'ya mesaj gönderebilirsiniz. @@ -12008,7 +12023,7 @@ son alınan msj: %2$@
- +
@@ -12045,7 +12060,7 @@ son alınan msj: %2$@
- +
@@ -12060,7 +12075,7 @@ son alınan msj: %2$@
- +
@@ -12082,7 +12097,7 @@ son alınan msj: %2$@
- +
@@ -12114,7 +12129,7 @@ son alınan msj: %2$@
- +
@@ -12136,7 +12151,7 @@ son alınan msj: %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/tr.xcloc/contents.json b/apps/ios/SimpleX Localizations/tr.xcloc/contents.json index 1aa8013358..1e9b3cdc53 100644 --- a/apps/ios/SimpleX Localizations/tr.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/tr.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "tr", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleX Localizations/uk.xcloc/Localized Contents/uk.xliff b/apps/ios/SimpleX Localizations/uk.xcloc/Localized Contents/uk.xliff index fe69dea6ab..f917609da7 100644 --- a/apps/ios/SimpleX Localizations/uk.xcloc/Localized Contents/uk.xliff +++ b/apps/ios/SimpleX Localizations/uk.xcloc/Localized Contents/uk.xliff @@ -2,7 +2,7 @@
- +
@@ -2472,8 +2472,8 @@ This is your own one-time link! Налаштування контактів No comment provided by engineer. - - Contact requests from groups + + Contact requests in groups No comment provided by engineer. @@ -2654,6 +2654,14 @@ This is your own one-time link! Створення посилання… No comment provided by engineer. + + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode Поточний пароль @@ -4662,6 +4670,10 @@ Error: %2$@ Групове запрошення більше не дійсне, воно було видалено відправником. No comment provided by engineer. + + Group invitations + No comment provided by engineer. + Group link Посилання на групу @@ -9445,10 +9457,6 @@ alert subtitle Це налаштування застосовується до повідомлень у вашому поточному профілі чату **%@**. No comment provided by engineer. - - This setting is for your current profile **%@**. - No comment provided by engineer. - Time to disappear is set only for new contacts. Час зникнення встановлюється тільки для нових контактів. @@ -10451,6 +10459,14 @@ Repeat join request? Тепер ви можете надсилати повідомлення на адресу %@ notification body + + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. Ви можете надсилати повідомлення на %@ з архівних контактів. @@ -12014,7 +12030,7 @@ last received msg: %2$@
- +
@@ -12051,7 +12067,7 @@ last received msg: %2$@
- +
@@ -12066,7 +12082,7 @@ last received msg: %2$@
- +
@@ -12088,7 +12104,7 @@ last received msg: %2$@
- +
@@ -12120,7 +12136,7 @@ last received msg: %2$@
- +
@@ -12142,7 +12158,7 @@ last received msg: %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/uk.xcloc/contents.json b/apps/ios/SimpleX Localizations/uk.xcloc/contents.json index c6053c573c..507dcc4ad1 100644 --- a/apps/ios/SimpleX Localizations/uk.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/uk.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "uk", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleX Localizations/zh-Hans.xcloc/Localized Contents/zh-Hans.xliff b/apps/ios/SimpleX Localizations/zh-Hans.xcloc/Localized Contents/zh-Hans.xliff index 1f6067fe53..67b08d7343 100644 --- a/apps/ios/SimpleX Localizations/zh-Hans.xcloc/Localized Contents/zh-Hans.xliff +++ b/apps/ios/SimpleX Localizations/zh-Hans.xcloc/Localized Contents/zh-Hans.xliff @@ -2,7 +2,7 @@
- +
@@ -2521,8 +2521,8 @@ This is your own one-time link! 联系人偏好设置 No comment provided by engineer. - - Contact requests from groups + + Contact requests in groups 来自群的联络请求 No comment provided by engineer. @@ -2710,6 +2710,14 @@ This is your own one-time link! 创建链接中… No comment provided by engineer. + + Crowdfunding on Wefunder + No comment provided by engineer. + + + Crowdfunding on Wefunder. + No comment provided by engineer. + Current Passcode 当前密码 @@ -4755,6 +4763,10 @@ Error: %2$@ 群组邀请不再有效,已被发件人删除。 No comment provided by engineer. + + Group invitations + No comment provided by engineer. + Group link 群组链接 @@ -9695,11 +9707,6 @@ alert subtitle 此设置适用于您当前聊天资料 **%@** 中的消息。 No comment provided by engineer. - - This setting is for your current profile **%@**. - 此设置用于当前个人资料 **%@**。 - No comment provided by engineer. - Time to disappear is set only for new contacts. 只为新联系人设置了消失时间。 @@ -10725,6 +10732,14 @@ Repeat join request? 您现在可以给 %@ 发送消息 notification body + + You can now invest in SimpleX Chat + No comment provided by engineer. + + + You can now invest in SimpleX Chat! 🚀 + No comment provided by engineer. + You can send messages to %@ from Archived contacts. 您可以从存档的联系人向%@发送消息。 @@ -12327,7 +12342,7 @@ last received msg: %2$@
- +
@@ -12364,7 +12379,7 @@ last received msg: %2$@
- +
@@ -12379,7 +12394,7 @@ last received msg: %2$@
- +
@@ -12401,7 +12416,7 @@ last received msg: %2$@
- +
@@ -12433,7 +12448,7 @@ last received msg: %2$@
- +
@@ -12455,7 +12470,7 @@ last received msg: %2$@
- +
diff --git a/apps/ios/SimpleX Localizations/zh-Hans.xcloc/contents.json b/apps/ios/SimpleX Localizations/zh-Hans.xcloc/contents.json index f8b8f54d3a..f2a57b2dd9 100644 --- a/apps/ios/SimpleX Localizations/zh-Hans.xcloc/contents.json +++ b/apps/ios/SimpleX Localizations/zh-Hans.xcloc/contents.json @@ -3,10 +3,10 @@ "project" : "SimpleX.xcodeproj", "targetLocale" : "zh-Hans", "toolInfo" : { - "toolBuildNumber" : "17F113", + "toolBuildNumber" : "17F42", "toolID" : "com.apple.dt.xcode", "toolName" : "Xcode", - "toolVersion" : "26.6" + "toolVersion" : "26.5" }, "version" : "1.0" } \ No newline at end of file diff --git a/apps/ios/SimpleXChat/ChatTypes.swift b/apps/ios/SimpleXChat/ChatTypes.swift index ddc9454b86..7f9f1a4fcc 100644 --- a/apps/ios/SimpleXChat/ChatTypes.swift +++ b/apps/ios/SimpleXChat/ChatTypes.swift @@ -42,6 +42,7 @@ public struct User: Identifiable, Decodable, UserLike, NamedChat, Hashable { public var sendRcptsContacts: Bool public var sendRcptsSmallGroups: Bool public var autoAcceptMemberContacts: Bool + public var autoAcceptGroupInvitations: Bool public var viewPwdHash: UserPwdHash? public var uiThemes: ThemeModeOverrides? public var userChatRelay: Bool @@ -71,6 +72,7 @@ public struct User: Identifiable, Decodable, UserLike, NamedChat, Hashable { sendRcptsContacts: true, sendRcptsSmallGroups: false, autoAcceptMemberContacts: false, + autoAcceptGroupInvitations: false, userChatRelay: false ) } diff --git a/apps/ios/de.lproj/Localizable.strings b/apps/ios/de.lproj/Localizable.strings index 41f64e5400..91ee6f3388 100644 --- a/apps/ios/de.lproj/Localizable.strings +++ b/apps/ios/de.lproj/Localizable.strings @@ -1692,7 +1692,7 @@ server test step */ "Contact preferences" = "Kontakt-Präferenzen"; /* No comment provided by engineer. */ -"Contact requests from groups" = "KONTAKTANFRAGEN VON GRUPPEN"; +"Contact requests in groups" = "KONTAKTANFRAGEN VON GRUPPEN"; /* No comment provided by engineer. */ "contact should accept…" = "Kontakt sollte annehmen…"; diff --git a/apps/ios/es.lproj/Localizable.strings b/apps/ios/es.lproj/Localizable.strings index a6d4e9d20c..46e86419b2 100644 --- a/apps/ios/es.lproj/Localizable.strings +++ b/apps/ios/es.lproj/Localizable.strings @@ -1692,7 +1692,7 @@ server test step */ "Contact preferences" = "Preferencias de contacto"; /* No comment provided by engineer. */ -"Contact requests from groups" = "Solicitudes de contacto en grupo"; +"Contact requests in groups" = "Solicitudes de contacto en grupo"; /* No comment provided by engineer. */ "contact should accept…" = "el contacto debe aceptarte…"; diff --git a/apps/ios/fr.lproj/Localizable.strings b/apps/ios/fr.lproj/Localizable.strings index 0952cacb90..5bfc7dca1d 100644 --- a/apps/ios/fr.lproj/Localizable.strings +++ b/apps/ios/fr.lproj/Localizable.strings @@ -1612,7 +1612,7 @@ server test step */ "Contact preferences" = "Préférences de contact"; /* No comment provided by engineer. */ -"Contact requests from groups" = "Demandes de contact des groupes"; +"Contact requests in groups" = "Demandes de contact des groupes"; /* No comment provided by engineer. */ "Contact will be deleted - this cannot be undone!" = "Le contact sera supprimé - il n'est pas possible de revenir en arrière !"; diff --git a/apps/ios/hu.lproj/Localizable.strings b/apps/ios/hu.lproj/Localizable.strings index 330688163e..ea687106b4 100644 --- a/apps/ios/hu.lproj/Localizable.strings +++ b/apps/ios/hu.lproj/Localizable.strings @@ -1692,7 +1692,7 @@ server test step */ "Contact preferences" = "Partnerbeállítások"; /* No comment provided by engineer. */ -"Contact requests from groups" = "Partneri kapcsolatkérések a csoportokból"; +"Contact requests in groups" = "Partneri kapcsolatkérések a csoportokból"; /* No comment provided by engineer. */ "contact should accept…" = "a partnernek el kell fogadnia…"; diff --git a/apps/ios/it.lproj/Localizable.strings b/apps/ios/it.lproj/Localizable.strings index 3544dc1813..5871fb7615 100644 --- a/apps/ios/it.lproj/Localizable.strings +++ b/apps/ios/it.lproj/Localizable.strings @@ -1692,7 +1692,7 @@ server test step */ "Contact preferences" = "Preferenze del contatto"; /* No comment provided by engineer. */ -"Contact requests from groups" = "Richieste di contatto dai gruppi"; +"Contact requests in groups" = "Richieste di contatto dai gruppi"; /* No comment provided by engineer. */ "contact should accept…" = "il contatto deve accettare…"; diff --git a/apps/ios/pl.lproj/Localizable.strings b/apps/ios/pl.lproj/Localizable.strings index 07c407416a..c7aa746e53 100644 --- a/apps/ios/pl.lproj/Localizable.strings +++ b/apps/ios/pl.lproj/Localizable.strings @@ -1416,7 +1416,7 @@ server test step */ "Contact preferences" = "Preferencje kontaktu"; /* No comment provided by engineer. */ -"Contact requests from groups" = "Prośby o kontakt od grup"; +"Contact requests in groups" = "Prośby o kontakt od grup"; /* No comment provided by engineer. */ "contact should accept…" = "kontakt powinien zaakceptować…"; diff --git a/apps/ios/ru.lproj/Localizable.strings b/apps/ios/ru.lproj/Localizable.strings index ce7e446211..79c28bdfb6 100644 --- a/apps/ios/ru.lproj/Localizable.strings +++ b/apps/ios/ru.lproj/Localizable.strings @@ -1692,7 +1692,7 @@ server test step */ "Contact preferences" = "Предпочтения контакта"; /* No comment provided by engineer. */ -"Contact requests from groups" = "Запросы на соединение из групп"; +"Contact requests in groups" = "Запросы на соединение из групп"; /* No comment provided by engineer. */ "contact should accept…" = "контакт должен принять…"; diff --git a/apps/ios/tr.lproj/Localizable.strings b/apps/ios/tr.lproj/Localizable.strings index b0dd32c383..d2e87a9fb5 100644 --- a/apps/ios/tr.lproj/Localizable.strings +++ b/apps/ios/tr.lproj/Localizable.strings @@ -1454,7 +1454,7 @@ server test step */ "Contact preferences" = "Kişi tercihleri"; /* No comment provided by engineer. */ -"Contact requests from groups" = "Gruplardan gelen iletişim talepleri"; +"Contact requests in groups" = "Gruplardan gelen iletişim talepleri"; /* No comment provided by engineer. */ "contact should accept…" = "kişi kabul etmeli…"; diff --git a/apps/ios/zh-Hans.lproj/Localizable.strings b/apps/ios/zh-Hans.lproj/Localizable.strings index e5d35b7426..e8a06c7d00 100644 --- a/apps/ios/zh-Hans.lproj/Localizable.strings +++ b/apps/ios/zh-Hans.lproj/Localizable.strings @@ -1680,7 +1680,7 @@ server test step */ "Contact preferences" = "联系人偏好设置"; /* No comment provided by engineer. */ -"Contact requests from groups" = "来自群的联络请求"; +"Contact requests in groups" = "来自群的联络请求"; /* No comment provided by engineer. */ "contact should accept…" = "联系人应当接受…"; diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt index 340ba2c1ad..11da8b874e 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt @@ -1293,6 +1293,7 @@ data class User( val sendRcptsContacts: Boolean, val sendRcptsSmallGroups: Boolean, val autoAcceptMemberContacts: Boolean, + val autoAcceptGroupInvitations: Boolean, val viewPwdHash: UserPwdHash?, val uiThemes: ThemeModeOverrides? = null, val userChatRelay: Boolean, @@ -1325,6 +1326,7 @@ data class User( sendRcptsContacts = true, sendRcptsSmallGroups = false, autoAcceptMemberContacts = false, + autoAcceptGroupInvitations = false, viewPwdHash = null, uiThemes = null, userChatRelay = false, diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt index 037c02b1c2..c351ee3281 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/SimpleXAPI.kt @@ -941,6 +941,12 @@ object ChatController { throw Exception("failed to set auto-accept ${r.responseType} ${r.details}") } + suspend fun apiSetUserAutoAcceptGroupInvitations(u: User, enable: Boolean) { + val r = sendCmd(u.remoteHostId, CC.ApiSetUserAutoAcceptGroupInvitations(u.userId, enable)) + if (r.result is CR.CmdOk) return + throw Exception("failed to set auto-accept group invitations ${r.responseType} ${r.details}") + } + suspend fun apiHideUser(u: User, viewPwd: String): User = setUserPrivacy(u.remoteHostId, CC.ApiHideUser(u.userId, viewPwd)) @@ -3775,6 +3781,7 @@ sealed class CC { class ApiSetUserContactReceipts(val userId: Long, val userMsgReceiptSettings: UserMsgReceiptSettings): CC() class ApiSetUserGroupReceipts(val userId: Long, val userMsgReceiptSettings: UserMsgReceiptSettings): CC() class ApiSetUserAutoAcceptMemberContacts(val userId: Long, val enable: Boolean): CC() + class ApiSetUserAutoAcceptGroupInvitations(val userId: Long, val enable: Boolean): CC() class ApiHideUser(val userId: Long, val viewPwd: String): CC() class ApiUnhideUser(val userId: Long, val viewPwd: String): CC() class ApiMuteUser(val userId: Long): CC() @@ -3965,6 +3972,7 @@ sealed class CC { "/_set receipts groups $userId ${onOff(mrs.enable)} clear_overrides=${onOff(mrs.clearOverrides)}" } is ApiSetUserAutoAcceptMemberContacts -> "/_set accept member contacts $userId ${onOff(enable)}" + is ApiSetUserAutoAcceptGroupInvitations -> "/_set accept group invitations $userId ${onOff(enable)}" is ApiHideUser -> "/_hide user $userId ${json.encodeToString(viewPwd)}" is ApiUnhideUser -> "/_unhide user $userId ${json.encodeToString(viewPwd)}" is ApiMuteUser -> "/_mute user $userId" @@ -4176,6 +4184,7 @@ sealed class CC { is ApiSetUserContactReceipts -> "apiSetUserContactReceipts" is ApiSetUserGroupReceipts -> "apiSetUserGroupReceipts" is ApiSetUserAutoAcceptMemberContacts -> "apiSetUserAutoAcceptMemberContacts" + is ApiSetUserAutoAcceptGroupInvitations -> "apiSetUserAutoAcceptGroupInvitations" is ApiHideUser -> "apiHideUser" is ApiUnhideUser -> "apiUnhideUser" is ApiMuteUser -> "apiMuteUser" diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/PrivacySettings.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/PrivacySettings.kt index 59136e90d2..314537f579 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/PrivacySettings.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/PrivacySettings.kt @@ -87,13 +87,19 @@ fun PrivacySettingsView( val currentUser = chatModel.currentUser.value if (currentUser != null && !chatModel.desktopNoUserNoRemote) { SectionDividerSpaced() - ContacRequestsFromGroupsSection( + AutoAcceptSection( currentUser = currentUser, - setAutoAcceptGrpDirectInvs = { enable -> + setAutoAcceptMemberContacts = { enable -> withApi { chatModel.controller.apiSetUserAutoAcceptMemberContacts(currentUser, enable) chatModel.currentUser.value = currentUser.copy(autoAcceptMemberContacts = enable) } + }, + setAutoAcceptGroupInvitations = { enable -> + withApi { + chatModel.controller.apiSetUserAutoAcceptGroupInvitations(currentUser, enable) + chatModel.currentUser.value = currentUser.copy(autoAcceptGroupInvitations = enable) + } } ) } @@ -333,16 +339,26 @@ expect fun PrivacyDeviceSection( ) @Composable -private fun ContacRequestsFromGroupsSection( +private fun AutoAcceptSection( currentUser: User, - setAutoAcceptGrpDirectInvs: (Boolean) -> Unit + setAutoAcceptMemberContacts: (Boolean) -> Unit, + setAutoAcceptGroupInvitations: (Boolean) -> Unit ) { - SectionView(stringResource(MR.strings.settings_section_title_contact_requests_from_groups)) { - SettingsActionItemWithContent(painterResource(MR.images.ic_check), stringResource(MR.strings.auto_accept_contact)) { + // legacy string key names, reused for their values so this section stays translated + SectionView(stringResource(MR.strings.auto_accept_contact)) { + SettingsActionItemWithContent(painterResource(MR.images.ic_person), stringResource(MR.strings.settings_section_title_contact_requests_from_groups)) { DefaultSwitch( checked = currentUser.autoAcceptMemberContacts, onCheckedChange = { enable -> - setAutoAcceptGrpDirectInvs(enable) + setAutoAcceptMemberContacts(enable) + } + ) + } + SettingsActionItemWithContent(painterResource(MR.images.ic_group), stringResource(MR.strings.group_invitations)) { + DefaultSwitch( + checked = currentUser.autoAcceptGroupInvitations, + onCheckedChange = { enable -> + setAutoAcceptGroupInvitations(enable) } ) } @@ -350,7 +366,7 @@ private fun ContacRequestsFromGroupsSection( SectionTextFooter( remember(currentUser.displayName) { buildAnnotatedString { - append(generalGetString(MR.strings.this_setting_is_for_your_current_profile) + " ") + append(generalGetString(MR.strings.these_settings_are_for_your_current_profile) + " ") withStyle(SpanStyle(fontWeight = FontWeight.Bold)) { append(currentUser.displayName) } @@ -387,7 +403,7 @@ private fun DeliveryReceiptsSection( SectionTextFooter( remember(currentUser.displayName) { buildAnnotatedString { - append(generalGetString(MR.strings.receipts_section_description) + " ") + append(generalGetString(MR.strings.these_settings_are_for_your_current_profile) + " ") withStyle(SpanStyle(fontWeight = FontWeight.Bold)) { append(currentUser.displayName) } diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/ar/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/ar/strings.xml index 9d9ea0cadd..af10952449 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/ar/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/ar/strings.xml @@ -1106,7 +1106,7 @@ انقر لتنشيط ملف التعريف. عزل النقل هذه السلسلة ليست رابط اتصال! - هذه الإعدادات لملف تعريفك الحالي + هذه الإعدادات لملف تعريفك الحالي يمكن تجاوزها في إعدادات الاتصال والمجموعة. انتهت مهلة اتصال TCP لحماية المنطقة الزمنية، تستخدم ملفات الصور / الصوت التوقيت العالمي المنسق (UTC). diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/base/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/base/strings.xml index 739467b3ff..d7e9fc936e 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/base/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/base/strings.xml @@ -1206,6 +1206,7 @@ Stop sharing address? Stop sharing Auto-accept + Group invitations Sent to your contact after connection. Welcome message Enter welcome message… (optional) @@ -1557,7 +1558,7 @@ If you enter this passcode when opening the app, all app data will be irreversibly removed! Set passcode This setting is for your current profile - These settings are for your current profile + These settings are for your current profile They can be overridden in contact and group settings. Contacts Enable receipts? @@ -1602,7 +1603,7 @@ Chats Files Send delivery receipts to - Contact requests from groups + Contact requests in groups About Contact Support the project diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/bg/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/bg/strings.xml index 9676bc0199..83e10a81c3 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/bg/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/bg/strings.xml @@ -481,7 +481,7 @@ Въведи правилна парола. активирано за вас Въведи парола в търсенето - Тези настройки са за текущия ви профил + Тези настройки са за текущия ви профил Те могат да бъдат променени в настройките за всеки контакт и група. Инструменти за разработчици Деактивиране за всички diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/ca/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/ca/strings.xml index ce38afb836..1ab559c09c 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/ca/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/ca/strings.xml @@ -1946,7 +1946,7 @@ Si introduïu aquesta contrasenya en obrir l\'aplicació, totes les dades de l\'aplicació s\'eliminaran de manera irreversible. Si introduïu el vostre codi d\'autodestrucció mentre obriu l\'aplicació: Estableix codi - Aquesta configuració és per al vostre perfil actual + Aquesta configuració és per al vostre perfil actual Es pot canviar a la configuració de contacte i grup. No Configuració diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/cs/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/cs/strings.xml index 5160d28feb..0fca3db40e 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/cs/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/cs/strings.xml @@ -1246,7 +1246,7 @@ vyžadováno opětovné vyjednávání šifrování pro %s Odesílání potvrzení o doručení je vypnuto pro %d kontakty. Odesílání potvrzení o doručení bude povoleno pro všechny kontakty ve všech viditelných profilech chatu. - Toto nastavení je pro váš aktuální profil + Toto nastavení je pro váš aktuální profil opětovné vyjednávání šifrování povoleno opětovné vyjednávání šifrování povoleno pro %s vyžadováno opětovné vyjednávání šifrování diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/de/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/de/strings.xml index 9774107fcf..b3490abc26 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/de/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/de/strings.xml @@ -1364,7 +1364,7 @@ Nach ungelesenen und favorisierten Chats filtern. Das Senden von Empfangsbestätigungen an alle Kontakte in allen sichtbaren Chat-Profilen wird aktiviert. Das Senden von Bestätigungen an %d Kontakte ist deaktiviert - Diese Einstellungen gelten für Ihr aktuelles Chat-Profil + Diese Einstellungen gelten für Ihr aktuelles Chat-Profil Sie können in den Kontakt- und Gruppeneinstellungen überschrieben werden. Kontakte Bestätigungen deaktivieren\? diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/el/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/el/strings.xml index 390913c5f7..d9feb33f1a 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/el/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/el/strings.xml @@ -1350,7 +1350,7 @@ Ο αποστολέας ΔΕΝ θα ειδοποιηθεί. Οι διακομιστές για τις νέες συνδέσεις του τρέχοντος προφίλ συνομιλίας σου Οι διακομιστές για τα νέα αρχεία του τρέχοντος προφίλ συνομιλίας σου - Αυτές οι ρυθμίσεις ισχύουν για το τρέχον προφίλ σου + Αυτές οι ρυθμίσεις ισχύουν για το τρέχον προφίλ σου Το κείμενο που επικόλλησες δεν είναι σύνδεσμος SimpleX. Το αρχείο της βάσης δεδομένων που μεταφορτώθηκε, θα διαγραφεί οριστικά από τους διακομιστές. Το βίντεο δεν μπορεί να αποκωδικοποιηθεί. Δοκίμασε ένα άλλο βίντεο ή επικοινώνησε με τους προγραμματιστές. diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/es/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/es/strings.xml index 4e3ce8e810..a8cf66f595 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/es/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/es/strings.xml @@ -1283,7 +1283,7 @@ El envío de confirmaciones está desactivado para %d contactos El envío de confirmaciones está activado para %d contactos Enviar confirmaciones - Esta configuración afecta a tu perfil actual + Esta configuración afecta a tu perfil actual Activar ¿Desactivar confirmaciones\? ¿Activar confirmaciones\? diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/fa/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/fa/strings.xml index 263b36d404..6e119a456a 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/fa/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/fa/strings.xml @@ -756,7 +756,7 @@ نام نمایشی جدید: اگر کد عبور خودتخریبی خود را زمان باز کردن برنامه وارد کنید: تمام اطلاعات برنامه حذف می‌شود. - این تنظیمات برای پروفایل فعلی شما هستند + این تنظیمات برای پروفایل فعلی شما هستند ارسال رسید برای %d مخاطب فعال است غیرفعال برای همه فعال برای همه گروه‌ها diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/fi/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/fi/strings.xml index f3c7a95ef4..7ae3f506a2 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/fi/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/fi/strings.xml @@ -1272,7 +1272,7 @@ Uudelleenneuvottele Uudelleenneuvottele salaus\? Salaus toimii ja uutta salaussopimusta ei tarvita. Tämä voi johtaa yhteysvirheisiin! - Nämä asetukset koskevat nykyistä profiiliasi + Nämä asetukset koskevat nykyistä profiiliasi Ne voidaan ohittaa kontakti- ja ryhmäasetuksissa. salaus ok salauksen uudelleenneuvottelu sallittu diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/fr/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/fr/strings.xml index 845fe28404..77843d63ae 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/fr/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/fr/strings.xml @@ -1280,7 +1280,7 @@ code de sécurité modifié L\'envoi d\'accusés de réception sera activé pour tous les contacts dans tous les profils de chat visibles. Ils peuvent être modifiés dans les paramètres des contacts et des groupes. - Ces paramètres s\'appliquent à votre profil actuel + Ces paramètres s\'appliquent à votre profil actuel Vous pouvez les activer ultérieurement via les paramètres de Confidentialité et Sécurité de l\'application. Activer les accusés de réception \? Désactiver les accusés de réception \? diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/hu/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/hu/strings.xml index f9e627b21a..886da8993b 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/hu/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/hu/strings.xml @@ -1475,7 +1475,7 @@ A jelmondat a beállításokban egyszerű szövegként van tárolva. Konzol megjelenítése új ablakban Az előző üzenet kivonata különbözik. - Ezek a beállítások csak a jelenlegi csevegési profiljára vonatkoznak + Ezek a beállítások csak a jelenlegi csevegési profiljára vonatkoznak Várjon, amíg a fájl betöltődik a társított hordozható eszközről GitHub-tárolónkban talál.]]> Hiba történt a tartalom megjelenítésekor diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/in/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/in/strings.xml index bd3f6e2b22..783b1a94c6 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/in/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/in/strings.xml @@ -1206,7 +1206,7 @@ Aktifkan tanda terima untuk grup? Profil obrolan kosong dengan nama yang disediakan dibuat, dan aplikasi terbuka seperti biasa. Jika Anda memasukkan kode sandi saat membuka aplikasi, semua data aplikasi akan dihapus secara permanen! - Pengaturan ini untuk profil Anda saat ini + Pengaturan ini untuk profil Anda saat ini Kirim tanda terima diaktifkan untuk %d kontak Kirim tanda terima dimatikan untuk %d kontak Gagal memuat server XFTP diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/it/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/it/strings.xml index 9fad882019..01f4d5c3c2 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/it/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/it/strings.xml @@ -1290,7 +1290,7 @@ L\'invio delle ricevute di consegna sarà attivo per tutti i contatti in tutti i profili di chat visibili. L\'invio di ricevute è disattivato per %d contatti La crittografia funziona e il nuovo accordo sulla crittografia non è richiesto. Potrebbero verificarsi errori di connessione! - Queste impostazioni sono per il tuo profilo attuale + Queste impostazioni sono per il tuo profilo attuale Possono essere sovrascritte nelle impostazioni dei contatti e dei gruppi. Attiva per tutti Attiva (mantieni sostituzioni) diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/iw/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/iw/strings.xml index 430acfa6c1..ea9e504e98 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/iw/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/iw/strings.xml @@ -1291,7 +1291,7 @@ \n- קבוצות קצת יותר טובות. \n- ועוד! שליחת קבלות שליחה תתאפשר עבור כל אנשי הקשר בכל פרופילי הצ\'אט הגלויים. - הגדרות אלו מיועדות לפרופיל הנוכחי שלך + הגדרות אלו מיועדות לפרופיל הנוכחי שלך ניתן לעקוף אותם בהגדרות אנשי קשר וקבוצות. שליחת קבלות מושבתת עבור %d אנשי קשר שליחת קבלות מאופשרת עבור %d אנשי קשר diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/ja/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/ja/strings.xml index e61e4e4372..af501f9b20 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/ja/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/ja/strings.xml @@ -1278,7 +1278,7 @@ グループメンバーによる修正はサポートされていません 連絡先 これらは連絡先とグループの設定が優先されます。 - これらの設定は現在のプロファイル用です + これらの設定は現在のプロファイル用です 配信通知を有効? %s : %s 接続を修正 diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/lt/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/lt/strings.xml index aceb11ecf8..87a0afa005 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/lt/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/lt/strings.xml @@ -1198,7 +1198,7 @@ %1$s!]]> Kad prisijungti su nuoroda Ši nuoroda nėra tinkama prisijungimo nuoroda! - Šie nustatymai yra jūsų dabartiniam profiliui + Šie nustatymai yra jūsų dabartiniam profiliui Slaptafrazė saugoma nustatymuose kaip paprastas tekstas. Bakstelėkite, kad prisijungti kaip inkognito Ši grupė turi daugiau nei %1$d narių, pristatymo kvitai nėra siunčiami. diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/lv/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/lv/strings.xml index c5473aeea4..26b4c51aa3 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/lv/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/lv/strings.xml @@ -1607,7 +1607,7 @@ Ievada tīkla operatori turpināt Ienākošais video zvans Ienākošais audio zvans - Čeki + Čeki Čeku apraksts 1 Čeku kontakti Čeku kontakti iespējot diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/nl/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/nl/strings.xml index 307ffc78fa..d162b8a44d 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/nl/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/nl/strings.xml @@ -1278,7 +1278,7 @@ Ontvangst bevestiging uitschakelen\? Ontvangst bevestiging inschakelen\? Het verzenden van ontvangst bevestiging is ingeschakeld voor %d-contactpersonen - Deze instellingen gelden voor uw huidige profiel + Deze instellingen gelden voor uw huidige profiel Uitschakelen (overschrijvingen behouden) Inschakelen voor iedereen Inschakelen (overschrijvingen behouden) diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/pl/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/pl/strings.xml index 0cf195510b..a25728ccaf 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/pl/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/pl/strings.xml @@ -1287,7 +1287,7 @@ Renegocjować szyfrowanie\? Wysyłanie potwierdzeń jest włączone dla %d kontaktów Szyfrowanie działa, a nowe uzgodnienie szyfrowania nie jest wymagane. Może to spowodować błędy w połączeniu! - Te ustawienia dotyczą Twojego bieżącego profilu + Te ustawienia dotyczą Twojego bieżącego profilu Można je nadpisać w ustawieniach kontaktu i grupy. szyfrowanie ok renegocjacja szyfrowania dozwolona diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/pt-rBR/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/pt-rBR/strings.xml index cbf69db5d4..41e08643ff 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/pt-rBR/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/pt-rBR/strings.xml @@ -1520,7 +1520,7 @@ bloqueado O código que você escaneou não é um QR code SimpleX. O navegador padrão é necessário para chamadas. Configure o navegador padrão no sistema e compartilhe mais informações com os desenvolvedores. - Essas configurações são para o seu perfil atual + Essas configurações são para o seu perfil atual O vídeo não pode ser decodificado. Por favor, tente com um vídeo diferente ou contate os desenvolvedores. Este é o seu próprio link de uso único! Tempo limite atingido durante a conexão com o desktop diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/ro/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/ro/strings.xml index ae0a98b44e..f691857fd3 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/ro/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/ro/strings.xml @@ -1999,7 +1999,7 @@ Pentru a efectua apeluri, permiteți utilizarea microfonului. Încheiați apelul și încercați să sunați din nou. Când sunt activați mai mulți operatori, niciunul dintre ei nu are metadate pentru a afla cine comunică cu cine. Video pornit - Aceste setări sunt pentru profilul tău actual + Aceste setări sunt pentru profilul tău actual Da Coada Utilizare de pe desktop diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/ru/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/ru/strings.xml index dae2a494dc..bd4d3c39ff 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/ru/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/ru/strings.xml @@ -1329,7 +1329,7 @@ Отправка отчётов о доставке включена для %d контактов Отправка отчётов о доставке будет включена для всех контактов во всех видимых профилях чата. Установка для Вашего активного профиля - Установки для Вашего активного профиля + Установки для Вашего активного профиля Отправка отчётов о доставке выключена для %d контактов Шифрование работает, и новое соглашение не требуется. Это может привести к ошибкам соединения! Вторая галочка - знать, что доставлено! ✅ diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/th/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/th/strings.xml index c7313e76a3..ddc258490f 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/th/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/th/strings.xml @@ -1280,7 +1280,7 @@ เร็วๆ นี้! อนุญาตให้มีการเจรจา encryption อีกครั้งสําหรับ %s %s: %s - การตั้งค่าเหล่านี้ใช้สำหรับโปรไฟล์ปัจจุบันของคุณ + การตั้งค่าเหล่านี้ใช้สำหรับโปรไฟล์ปัจจุบันของคุณ สามารถลบล้างได้ในการตั้งค่าผู้ติดต่อและกลุ่ม ปิดใช้งาน (เก็บการแทนที่) เปิดใช้งาน (เก็บการแทนที่) diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/tr/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/tr/strings.xml index a1ead8c55e..2fff0e4082 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/tr/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/tr/strings.xml @@ -1204,7 +1204,7 @@ SimpleX Kilit aktif değil! SimpleX Kilit Doğrudan bağlanılsın mı? - Bu ayarlar mevcut profiliniz içindir + Bu ayarlar mevcut profiliniz içindir Sunucu testi başarısız! Bağlantıyı onayla Yeni sohbet başlat diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/uk/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/uk/strings.xml index 9a59fec674..439be068fa 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/uk/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/uk/strings.xml @@ -1271,7 +1271,7 @@ Скасувати Виберіть файл Контакти - Ці налаштування стосуються вашого поточного профілю + Ці налаштування стосуються вашого поточного профілю Вимкнути повідомлення про доставку? Увімкнути повідомлення про доставку? можлива перезапис шифрування diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/vi/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/vi/strings.xml index c285722200..5d97b21a1f 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/vi/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/vi/strings.xml @@ -1972,7 +1972,7 @@ Văn bản bạn vừa dán không phải là một đường dẫn SimpleX. Chức vụ sẽ được đổi thành %s. Thành viên sẽ nhận được một lời mời mới. Mật khẩu sẽ được lưu trữ trong cài đặt dưới dạng thuần văn bản sau khi bản đổi nó hoặc khởi động lại ứng dụng. - Các cài đặt này là cho hồ sơ trò chuyện hiện tại của bạn + Các cài đặt này là cho hồ sơ trò chuyện hiện tại của bạn Chức vụ sẽ được đổi thành %s. Tất cả mọi người trong nhóm sẽ được thông báo. Bản lưu trữ cơ sở dữ liệu đã được tải lên sẽ bị xóa vĩnh viễn khỏi các máy chủ. Việc này không thể được hoàn tác - hồ sơ, các liên hệ, tin nhắn và tệp của bạn sẽ biến mất mà không thể khôi phục. diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/zh-rCN/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/zh-rCN/strings.xml index 9dea7a5a0a..957d051898 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/zh-rCN/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/zh-rCN/strings.xml @@ -1344,7 +1344,7 @@ 连接请求将发送给该群成员。 密码以明文形式存储在设置中。 同步连接时出错 - 这些设置适用于你当前的个人资料 + 这些设置适用于你当前的个人资料 允许为 %s 重新协商加密 为所有人启用 需要重新协商加密 diff --git a/apps/multiplatform/common/src/commonMain/resources/MR/zh-rTW/strings.xml b/apps/multiplatform/common/src/commonMain/resources/MR/zh-rTW/strings.xml index c6cf22f427..ad82cb8329 100644 --- a/apps/multiplatform/common/src/commonMain/resources/MR/zh-rTW/strings.xml +++ b/apps/multiplatform/common/src/commonMain/resources/MR/zh-rTW/strings.xml @@ -2444,7 +2444,7 @@ 未使用 Tor 或 VPN 時,你的 IP 地址會對檔案伺服器可見。 移除連結追蹤 此設定適用於你目前的個人檔案 - 這些設定適用於你目前的個人檔案 + 這些設定適用於你目前的個人檔案 可在聯絡人和群組設定中覆寫這些設定。 已為 %d 個聯絡人啟用送達回條 已為 %d 個聯絡人停用送達回條 diff --git a/bots/api/COMMANDS.md b/bots/api/COMMANDS.md index 476ee4f94d..d88181b778 100644 --- a/bots/api/COMMANDS.md +++ b/bots/api/COMMANDS.md @@ -61,6 +61,7 @@ This file is generated automatically. - [APISetGroupCustomData](#apisetgroupcustomdata) - [APISetContactCustomData](#apisetcontactcustomdata) - [APISetUserAutoAcceptMemberContacts](#apisetuserautoacceptmembercontacts) +- [APISetUserAutoAcceptGroupInvitations](#apisetuserautoacceptgroupinvitations) [User profile commands](#user-profile-commands) - [ShowActiveUser](#showactiveuser) @@ -1972,6 +1973,43 @@ ChatCmdError: Command error (only used in WebSockets API). --- +### APISetUserAutoAcceptGroupInvitations + +Set auto-accept group invitations. + +*Network usage*: no. + +**Parameters**: +- userId: int64 +- onOff: bool + +**Syntax**: + +``` +/_set accept group invitations on|off +``` + +```javascript +'/_set accept group invitations ' + userId + ' ' + (onOff ? 'on' : 'off') // JavaScript +``` + +```python +'/_set accept group invitations ' + str(userId) + ' ' + ('on' if onOff else 'off') # Python +``` + +**Responses**: + +CmdOk: Ok. +- type: "cmdOk" +- user_: [User](./TYPES.md#user)? + +ChatCmdError: Command error (only used in WebSockets API). +- type: "chatCmdError" +- chatError: [ChatError](./TYPES.md#chaterror) + +--- + + ## User profile commands Most bots don't need to use these commands, as bot profile can be configured manually via CLI or desktop client. These commands can be used by bots that need to manage multiple user profiles (e.g., the profiles of support agents). diff --git a/bots/api/TYPES.md b/bots/api/TYPES.md index 47afd602d4..2d26f9bb2f 100644 --- a/bots/api/TYPES.md +++ b/bots/api/TYPES.md @@ -4367,6 +4367,7 @@ Handshake: - sendRcptsContacts: bool - sendRcptsSmallGroups: bool - autoAcceptMemberContacts: bool +- autoAcceptGroupInvitations: bool - userMemberProfileUpdatedAt: UTCTime? - userChatRelay: bool - clientService: bool diff --git a/bots/src/API/Docs/Commands.hs b/bots/src/API/Docs/Commands.hs index 09ae1faa5b..d126ff1844 100644 --- a/bots/src/API/Docs/Commands.hs +++ b/bots/src/API/Docs/Commands.hs @@ -154,7 +154,8 @@ chatCommandsDocsData = ("APIDeleteChat", [], "Delete chat.", ["CRContactDeleted", "CRContactConnectionDeleted", "CRGroupDeletedUser", "CRChatCmdError"], [], Just UNBackground, "/_delete " <> Param "chatRef" <> " " <> Param "chatDeleteMode"), ("APISetGroupCustomData", [], "Set group custom data.", ["CRCmdOk", "CRChatCmdError"], [], Nothing, "/_set custom #" <> Param "groupId" <> Optional "" (" " <> Json "$0") "customData"), ("APISetContactCustomData", [], "Set contact custom data.", ["CRCmdOk", "CRChatCmdError"], [], Nothing, "/_set custom @" <> Param "contactId" <> Optional "" (" " <> Json "$0") "customData"), - ("APISetUserAutoAcceptMemberContacts", [], "Set auto-accept member contacts.", ["CRCmdOk", "CRChatCmdError"], [], Nothing, "/_set accept member contacts " <> Param "userId" <> " " <> OnOff "onOff") + ("APISetUserAutoAcceptMemberContacts", [], "Set auto-accept member contacts.", ["CRCmdOk", "CRChatCmdError"], [], Nothing, "/_set accept member contacts " <> Param "userId" <> " " <> OnOff "onOff"), + ("APISetUserAutoAcceptGroupInvitations", [], "Set auto-accept group invitations.", ["CRCmdOk", "CRChatCmdError"], [], Nothing, "/_set accept group invitations " <> Param "userId" <> " " <> OnOff "onOff") -- ("APIChatItemsRead", [], "Mark items as read.", ["CRItemsReadForChat"], [], Nothing, ""), -- ("APIChatRead", [], "Mark chat as read.", ["CRCmdOk"], [], Nothing, ""), -- ("APIChatUnread", [], "Mark chat as unread.", ["CRCmdOk"], [], Nothing, ""), @@ -297,6 +298,7 @@ cliCommands = "SetUserFeature", "SetUserGroupReceipts", "SetUserAutoAcceptMemberContacts", + "SetUserAutoAcceptGroupInvitations", "SetUserTimedMessages", "ShareMyAddress", "SharePublicGroup", diff --git a/packages/simplex-chat-client/types/typescript/src/commands.ts b/packages/simplex-chat-client/types/typescript/src/commands.ts index 14b03f560f..0dfd63ba88 100644 --- a/packages/simplex-chat-client/types/typescript/src/commands.ts +++ b/packages/simplex-chat-client/types/typescript/src/commands.ts @@ -728,6 +728,21 @@ export namespace APISetUserAutoAcceptMemberContacts { } } +// Set auto-accept group invitations. +// Network usage: no. +export interface APISetUserAutoAcceptGroupInvitations { + userId: number // int64 + onOff: boolean +} + +export namespace APISetUserAutoAcceptGroupInvitations { + export type Response = CR.CmdOk | CR.ChatCmdError + + export function cmdString(self: APISetUserAutoAcceptGroupInvitations): string { + return '/_set accept group invitations ' + self.userId + ' ' + (self.onOff ? 'on' : 'off') + } +} + // User profile commands // Most bots don't need to use these commands, as bot profile can be configured manually via CLI or desktop client. These commands can be used by bots that need to manage multiple user profiles (e.g., the profiles of support agents). diff --git a/packages/simplex-chat-client/types/typescript/src/types.ts b/packages/simplex-chat-client/types/typescript/src/types.ts index ea98d99151..1779df783e 100644 --- a/packages/simplex-chat-client/types/typescript/src/types.ts +++ b/packages/simplex-chat-client/types/typescript/src/types.ts @@ -5043,6 +5043,7 @@ export interface User { sendRcptsContacts: boolean sendRcptsSmallGroups: boolean autoAcceptMemberContacts: boolean + autoAcceptGroupInvitations: boolean userMemberProfileUpdatedAt?: string // ISO-8601 timestamp userChatRelay: boolean clientService: boolean diff --git a/packages/simplex-chat-python/src/simplex_chat/types/_commands.py b/packages/simplex-chat-python/src/simplex_chat/types/_commands.py index f73a4fa4f7..086b3cfd29 100644 --- a/packages/simplex-chat-python/src/simplex_chat/types/_commands.py +++ b/packages/simplex-chat-python/src/simplex_chat/types/_commands.py @@ -637,6 +637,19 @@ def APISetUserAutoAcceptMemberContacts_cmd_string(self: APISetUserAutoAcceptMemb APISetUserAutoAcceptMemberContacts_Response = CR.CmdOk | CR.ChatCmdError +# Set auto-accept group invitations. +# Network usage: no. +class APISetUserAutoAcceptGroupInvitations(TypedDict): + userId: int # int64 + onOff: bool + + +def APISetUserAutoAcceptGroupInvitations_cmd_string(self: APISetUserAutoAcceptGroupInvitations) -> str: + return '/_set accept group invitations ' + str(self['userId']) + ' ' + ('on' if self['onOff'] else 'off') + +APISetUserAutoAcceptGroupInvitations_Response = CR.CmdOk | CR.ChatCmdError + + # User profile commands # Most bots don't need to use these commands, as bot profile can be configured manually via CLI or desktop client. These commands can be used by bots that need to manage multiple user profiles (e.g., the profiles of support agents). diff --git a/packages/simplex-chat-python/src/simplex_chat/types/_types.py b/packages/simplex-chat-python/src/simplex_chat/types/_types.py index 8569acc026..4c30c83bf5 100644 --- a/packages/simplex-chat-python/src/simplex_chat/types/_types.py +++ b/packages/simplex-chat-python/src/simplex_chat/types/_types.py @@ -3527,6 +3527,7 @@ class User(TypedDict): sendRcptsContacts: bool sendRcptsSmallGroups: bool autoAcceptMemberContacts: bool + autoAcceptGroupInvitations: bool userMemberProfileUpdatedAt: NotRequired[str] # ISO-8601 timestamp userChatRelay: bool clientService: bool diff --git a/plans/2026-08-13-auto-accept-group-invitations.md b/plans/2026-08-13-auto-accept-group-invitations.md new file mode 100644 index 0000000000..fdce3ebd2f --- /dev/null +++ b/plans/2026-08-13-auto-accept-group-invitations.md @@ -0,0 +1,149 @@ +# Auto-accept Group Invitations — Plan + +## Table of Contents +1. [Context](#1-context) +2. [Why This Belongs in the Core](#2-why-this-belongs-in-the-core) +3. [Design](#3-design) +4. [Decisions and Justification](#4-decisions-and-justification) +5. [Scope](#5-scope) +6. [Verification](#6-verification) + +--- + +## 1. Context + +**Problem**: Every group invitation requires the user to tap accept, even when they have +already decided they want to join groups from their contacts. Users in active communities +accumulate invitations that are pure friction — the decision was made when they added the +contact, not when the invitation arrived. + +**Precedent**: Privacy & security already carries a per-profile "Contact requests from +groups / Auto-accept" toggle (`users.auto_accept_member_contacts`, added in +`M20250729_member_contact_requests`). This change adds the equivalent for group +invitations — per-profile flag, same command pair — and regroups both under a single +**Auto-accept** section, so the two rows name what is being accepted rather than repeating +"Auto-accept" as two adjacent section headers: + +``` +Auto-accept + Contact requests in groups [ ] + Group invitations [ ] + These settings are for your current profile . +``` + +--- + +## 2. Why This Belongs in the Core + +The naive implementation is client-side: observe `CEvtReceivedGroupInvitation`, then call +`APIJoinGroup`. That is wrong here for three reasons. + +1. **It does not work when the app is closed.** Invitations arrive through the notification + extension and background message processing. A client-side rule cannot run there. +2. **`APIJoinGroup` blocks.** It takes `withGroupLock`, calls the agent's `joinConnection` + synchronously, and rolls member status back to `GSMemInvited` via `catchAllErrors` on + failure. Driving that from an event handler couples message processing to a network + round trip. +3. **It would be reimplemented per client.** Android, desktop and iOS would each carry the + decision, and they would drift. + +The flag therefore lives on `users`, and the decision is made where the invitation is +received. + +--- + +## 3. Design + +`processGroupInvitation` already contained an async accept path, used when an invitation +matches a group link the user opened: + +``` +prepareAgentJoin -> createMemberConnectionAsync -> joinAgentConnectionAsync +``` + +The outcome is reported later against the `CFJoinConn` command id, so nothing blocks. This +change does not add a second mechanism — it turns the existing two-way branch into three, +and auto-accept takes the path that already exists: + +| Condition | Behaviour | +|---|---| +| invitation matches an opened group link | join async, no chat item (unchanged) | +| profile auto-accepts, membership still `GSMemInvited` | join async, record accepted item | +| otherwise | create pending invitation item, notify (unchanged) | + +The shared sequence is extracted as `joinGroupAsync`; the invitation item as +`createInvitationItem`, parameterised by `CIGroupInvitationStatus` rather than a boolean. + +--- + +## 4. Decisions and Justification + +**Per-profile, not global.** Matches the sibling toggle and the user's mental model: a +profile is an identity, and willingness to auto-join groups is a property of that identity. +An incognito or work profile should not inherit a personal profile's setting. + +**A chat item is still recorded.** The group-link branch creates no item because the user +initiated the join. Auto-accept is not user-initiated, so a `CIRcvGroupInvitation` with +status `CIGISAccepted` is written to the chat with the inviting contact — a durable record +of who added the user to what. It is deliberately left counting as unread +(`ciRequiresAttention`), so an auto-join is noticed rather than silent. + +**`hostContact` is reported only for group links.** Clients respond to `hostContact` on +`CEvtUserAcceptedGroupSent` by replacing the transient host connection view with the group +and removing that chat. That is right for a group link, where the contact is a placeholder +created to join. For a plain invitation the contact is a real one, and removing their chat +would be destructive — so auto-accept passes `Nothing`, matching `APIJoinGroup`. + +**The join only runs while membership is `GSMemInvited`.** `createGroupInvitation` is +idempotent on `inv_queue_info`: a resent invitation returns the existing group rather than +failing. Without the guard, every resend would open another agent connection, which a +hostile or buggy host could drive indefinitely. A resend after joining is ignored. + +**UI strings reuse legacy keys deliberately.** The section header, the contact-requests row +and the footer use `auto_accept_contact`, `settings_section_title_contact_requests_from_groups` +and `receipts_section_description` — key names that no longer describe where they are used. +This is intentional: those keys are already translated in 35, 20 and 28 of 41 locales +respectively, while any newly added key ships English everywhere until translators catch up, +which would have put an English header and footer around a translated row. Only +`group_invitations` is genuinely new, so the feature adds exactly one string. Renaming these +keys to match their new use would discard the existing translations. All 28 translations of +`receipts_section_description` were checked and none mention receipts, so the reuse is safe. + +**Security note.** This converts a user-gated action into an automatic one: a contact can +cause the client to open group connections and fetch history without a prompt. It is +opt-in and per-profile, and channels cannot be used for it — `processGroupInvitation` +rejects `publicGroup` invitations outright. No rate cap is applied; the setting is +explicit. + +**Known behaviour.** Clients drop events for non-active profiles (`active(user)` guard), so +a group auto-accepted on a background profile becomes visible when switching to that +profile. The join itself happens on arrival: `subscribeUsers` passes the agent the active +user's id rather than the user list, and the agent enumerates every user's servers from its +own store — the active id orders subscriptions, it does not filter them. + +--- + +## 5. Scope + +| Layer | Change | +|---|---| +| Schema | `users.auto_accept_group_invitations` (`M20260813`, SQLite + Postgres) | +| Core | `User` field; `APISetUserAutoAcceptGroupInvitations` / `SetUserAutoAcceptGroupInvitations`; third branch in `processGroupInvitation` | +| Bot API | documented command; regenerated TypeScript/Python bindings and markdown | +| Android/desktop | Privacy & security: two per-profile toggles regrouped under one **Auto-accept** section; the contact-requests row relabelled "Contact requests in groups" | +| iOS | same section in `PrivacySettings.swift` | + +--- + +## 6. Verification + +- Schema dump, `.lint`, strict tables, and **down-migration round-trip** pass; the down + migration restores the original DDL byte-for-byte, so no skip-list entry is needed. +- JSON fixtures and all Bot API doc/codegen specs pass with no regenerated drift. +- `testGroupCheckMessages` and `testGroupLink` pass — the manual and group-link branches + are behaviour-preserving through the refactor. +- Three new tests: auto-accept on the active profile, on a second profile, and on an + inactive profile while another is active. + +**Not verified**: iOS is not compiled (no toolchain available); the Postgres schema test is +gated behind `#if defined(dbPostgres)` and was not run. diff --git a/simplex-chat.cabal b/simplex-chat.cabal index 404456b122..26f808d266 100644 --- a/simplex-chat.cabal +++ b/simplex-chat.cabal @@ -153,6 +153,7 @@ library Simplex.Chat.Store.Postgres.Migrations.M20260716_signed_history Simplex.Chat.Store.Postgres.Migrations.M20260720_server_roles Simplex.Chat.Store.Postgres.Migrations.M20260723_contact_request_rejection + Simplex.Chat.Store.Postgres.Migrations.M20260813_auto_accept_group_invitations else exposed-modules: Simplex.Chat.Archive @@ -323,6 +324,7 @@ library Simplex.Chat.Store.SQLite.Migrations.M20260716_signed_history Simplex.Chat.Store.SQLite.Migrations.M20260720_server_roles Simplex.Chat.Store.SQLite.Migrations.M20260723_contact_request_rejection + Simplex.Chat.Store.SQLite.Migrations.M20260813_auto_accept_group_invitations other-modules: Paths_simplex_chat hs-source-dirs: diff --git a/src/Simplex/Chat/Controller.hs b/src/Simplex/Chat/Controller.hs index b9ce3587fc..54dfb58fc3 100644 --- a/src/Simplex/Chat/Controller.hs +++ b/src/Simplex/Chat/Controller.hs @@ -340,6 +340,8 @@ data ChatCommand | SetUserGroupReceipts UserMsgReceiptSettings | APISetUserAutoAcceptMemberContacts {userId :: UserId, onOff :: Bool} | SetUserAutoAcceptMemberContacts Bool + | APISetUserAutoAcceptGroupInvitations {userId :: UserId, onOff :: Bool} + | SetUserAutoAcceptGroupInvitations Bool | APIHideUser UserId UserPwd | APIUnhideUser UserId UserPwd | APIMuteUser UserId diff --git a/src/Simplex/Chat/Library/Commands.hs b/src/Simplex/Chat/Library/Commands.hs index f4906d74e8..d98b387097 100644 --- a/src/Simplex/Chat/Library/Commands.hs +++ b/src/Simplex/Chat/Library/Commands.hs @@ -506,6 +506,12 @@ processChatCommand cxt nm = \case withFastStore' $ \db -> updateUserAutoAcceptMemberContacts db user' onOff ok user SetUserAutoAcceptMemberContacts onOff -> withUser $ \User {userId} -> processChatCommand cxt nm $ APISetUserAutoAcceptMemberContacts userId onOff + APISetUserAutoAcceptGroupInvitations userId' onOff -> withUser $ \user -> do + user' <- privateGetUser userId' + validateUserPassword user user' Nothing + withFastStore' $ \db -> updateUserAutoAcceptGroupInvitations db user' onOff + ok user + SetUserAutoAcceptGroupInvitations onOff -> withUser $ \User {userId} -> processChatCommand cxt nm $ APISetUserAutoAcceptGroupInvitations userId onOff APIHideUser userId' (UserPwd viewPwd) -> withUser $ \user -> do user' <- privateGetUser userId' case viewPwdHash user' of @@ -5433,6 +5439,8 @@ chatCommandP = "/set receipts groups " *> (SetUserGroupReceipts <$> receiptSettings), "/_set accept member contacts " *> (APISetUserAutoAcceptMemberContacts <$> A.decimal <* A.space <*> onOffP), "/set accept member contacts " *> (SetUserAutoAcceptMemberContacts <$> onOffP), + "/_set accept group invitations " *> (APISetUserAutoAcceptGroupInvitations <$> A.decimal <* A.space <*> onOffP), + "/set accept group invitations " *> (SetUserAutoAcceptGroupInvitations <$> onOffP), "/_hide user " *> (APIHideUser <$> A.decimal <* A.space <*> jsonP), "/_unhide user " *> (APIUnhideUser <$> A.decimal <* A.space <*> jsonP), "/_mute user " *> (APIMuteUser <$> A.decimal), diff --git a/src/Simplex/Chat/Library/Subscriber.hs b/src/Simplex/Chat/Library/Subscriber.hs index df269bdd81..79ce572785 100644 --- a/src/Simplex/Chat/Library/Subscriber.hs +++ b/src/Simplex/Chat/Library/Subscriber.hs @@ -2618,24 +2618,35 @@ processAgentMessageConn cxt user@User {userId} corrId agentConnId agentMessage = (gInfo@GroupInfo {groupId, localDisplayName, groupProfile, membership}, hostId) <- withStore $ \db -> createGroupInvitation db cxt user ct inv customUserProfileId void $ createChatItem user (CDGroupSnd gInfo Nothing) False CIChatBanner Nothing Nothing (Just epochStart) let GroupMember {groupMemberId, memberId = membershipMemId} = membership - if sameGroupLinkId groupLinkId groupLinkId' - then do - subMode <- chatReadVar subscriptionMode - dm <- encodeConnInfo $ XGrpAcpt membershipMemId - connIds@(cmdId, acId) <- prepareAgentJoin user Nothing True connRequest - withStore' $ \db -> do - setViaGroupLinkUri db groupId connId - createMemberConnectionAsync db user hostId connIds connChatVersion peerChatVRange subMode - updateGroupMemberStatusById db userId hostId GSMemAccepted - updateGroupMemberStatus db userId membership GSMemAccepted - joinAgentConnectionAsync cmdId False acId True connRequest dm subMode - toView $ CEvtUserAcceptedGroupSent user gInfo {membership = membership {memberStatus = GSMemAccepted}} (Just ct) - else do - let content = CIRcvGroupInvitation (CIGroupInvitation {groupId, groupMemberId, localDisplayName, groupProfile, status = CIGISPending}) memRole - (ci, cInfo) <- saveRcvChatItemNoParse user (CDDirectRcv ct) msg brokerTs content - withStore' $ \db -> setGroupInvitationChatItemId db user groupId (chatItemId' ci) - toView $ CEvtNewChatItems user [AChatItem SCTDirect SMDRcv cInfo ci] - toView $ CEvtReceivedGroupInvitation {user, groupInfo = gInfo, contact = ct, fromMemberRole = fromRole, memberRole = memRole} + -- hostContact is only reported for group links, where the client replaces + -- the transient host connection view with the group and removes its chat + joinGroupAsync hostContact_ sameLink = do + subMode <- chatReadVar subscriptionMode + dm <- encodeConnInfo $ XGrpAcpt membershipMemId + connIds@(cmdId, acId) <- prepareAgentJoin user Nothing True connRequest + withStore' $ \db -> do + when sameLink $ setViaGroupLinkUri db groupId connId + createMemberConnectionAsync db user hostId connIds connChatVersion peerChatVRange subMode + updateGroupMemberStatusById db userId hostId GSMemAccepted + updateGroupMemberStatus db userId membership GSMemAccepted + joinAgentConnectionAsync cmdId False acId True connRequest dm subMode + toView $ CEvtUserAcceptedGroupSent user gInfo {membership = membership {memberStatus = GSMemAccepted}} hostContact_ + createInvitationItem invStatus = do + let content = CIRcvGroupInvitation (CIGroupInvitation {groupId, groupMemberId, localDisplayName, groupProfile, status = invStatus}) memRole + (ci, cInfo) <- saveRcvChatItemNoParse user (CDDirectRcv ct) msg brokerTs content + withStore' $ \db -> setGroupInvitationChatItemId db user groupId (chatItemId' ci) + toView $ CEvtNewChatItems user [AChatItem SCTDirect SMDRcv cInfo ci] + if + | sameGroupLinkId groupLinkId groupLinkId' -> + joinGroupAsync (Just ct) True + | isTrue (autoAcceptGroupInvitations user) -> + -- a resent invitation returns the existing group, so only join while still invited + when (memberStatus membership == GSMemInvited) $ do + joinGroupAsync Nothing False + createInvitationItem CIGISAccepted + | otherwise -> do + createInvitationItem CIGISPending + toView $ CEvtReceivedGroupInvitation {user, groupInfo = gInfo, contact = ct, fromMemberRole = fromRole, memberRole = memRole} where GroupInvitation {groupProfile = GroupProfile {publicGroup}} = inv brokerTs = metaBrokerTs msgMeta diff --git a/src/Simplex/Chat/Store/Postgres/Migrations.hs b/src/Simplex/Chat/Store/Postgres/Migrations.hs index 19c07edbf8..62021bbe4b 100644 --- a/src/Simplex/Chat/Store/Postgres/Migrations.hs +++ b/src/Simplex/Chat/Store/Postgres/Migrations.hs @@ -46,6 +46,7 @@ import Simplex.Chat.Store.Postgres.Migrations.M20260715_profile_description import Simplex.Chat.Store.Postgres.Migrations.M20260716_signed_history import Simplex.Chat.Store.Postgres.Migrations.M20260720_server_roles import Simplex.Chat.Store.Postgres.Migrations.M20260723_contact_request_rejection +import Simplex.Chat.Store.Postgres.Migrations.M20260813_auto_accept_group_invitations import Simplex.Messaging.Agent.Store.Shared (Migration (..)) schemaMigrations :: [(String, Text, Maybe Text)] @@ -91,7 +92,8 @@ schemaMigrations = ("20260715_profile_description", m20260715_profile_description, Just down_m20260715_profile_description), ("20260716_signed_history", m20260716_signed_history, Just down_m20260716_signed_history), ("20260720_server_roles", m20260720_server_roles, Just down_m20260720_server_roles), - ("20260723_contact_request_rejection", m20260723_contact_request_rejection, Just down_m20260723_contact_request_rejection) + ("20260723_contact_request_rejection", m20260723_contact_request_rejection, Just down_m20260723_contact_request_rejection), + ("20260813_auto_accept_group_invitations", m20260813_auto_accept_group_invitations, Just down_m20260813_auto_accept_group_invitations) ] -- | The list of migrations in ascending order by date diff --git a/src/Simplex/Chat/Store/Postgres/Migrations/M20260813_auto_accept_group_invitations.hs b/src/Simplex/Chat/Store/Postgres/Migrations/M20260813_auto_accept_group_invitations.hs new file mode 100644 index 0000000000..fa1e621619 --- /dev/null +++ b/src/Simplex/Chat/Store/Postgres/Migrations/M20260813_auto_accept_group_invitations.hs @@ -0,0 +1,19 @@ +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QuasiQuotes #-} + +module Simplex.Chat.Store.Postgres.Migrations.M20260813_auto_accept_group_invitations where + +import Data.Text (Text) +import Text.RawString.QQ (r) + +m20260813_auto_accept_group_invitations :: Text +m20260813_auto_accept_group_invitations = + [r| +ALTER TABLE users ADD COLUMN auto_accept_group_invitations SMALLINT NOT NULL DEFAULT 0; +|] + +down_m20260813_auto_accept_group_invitations :: Text +down_m20260813_auto_accept_group_invitations = + [r| +ALTER TABLE users DROP COLUMN auto_accept_group_invitations; +|] diff --git a/src/Simplex/Chat/Store/Postgres/Migrations/chat_schema.sql b/src/Simplex/Chat/Store/Postgres/Migrations/chat_schema.sql index ae695d3c37..0978a54115 100644 --- a/src/Simplex/Chat/Store/Postgres/Migrations/chat_schema.sql +++ b/src/Simplex/Chat/Store/Postgres/Migrations/chat_schema.sql @@ -1510,7 +1510,8 @@ CREATE TABLE test_chat_schema.users ( active_order bigint DEFAULT 0 NOT NULL, auto_accept_member_contacts smallint DEFAULT 0 NOT NULL, is_user_chat_relay smallint DEFAULT 0 NOT NULL, - client_service smallint DEFAULT 0 NOT NULL + client_service smallint DEFAULT 0 NOT NULL, + auto_accept_group_invitations smallint DEFAULT 0 NOT NULL ); diff --git a/src/Simplex/Chat/Store/Profiles.hs b/src/Simplex/Chat/Store/Profiles.hs index 0613069dd7..965cbcbc78 100644 --- a/src/Simplex/Chat/Store/Profiles.hs +++ b/src/Simplex/Chat/Store/Profiles.hs @@ -42,6 +42,7 @@ module Simplex.Chat.Store.Profiles updateUserContactReceipts, updateUserGroupReceipts, updateUserAutoAcceptMemberContacts, + updateUserAutoAcceptGroupInvitations, updateUserProfile, setUserBadge, setUserProfileContactLink, @@ -139,12 +140,13 @@ createUserRecordAt db (AgentUserId auId) userChatRelay clientService Profile {di sendRcptsContacts = True sendRcptsSmallGroups = True autoAcceptMemberContacts = False + autoAcceptGroupInvitations = False order <- getNextActiveOrder db DB.execute db - "INSERT INTO users (agent_user_id, local_display_name, active_user, is_user_chat_relay, active_order, contact_id, show_ntfs, send_rcpts_contacts, send_rcpts_small_groups, auto_accept_member_contacts, client_service, created_at, updated_at) VALUES (?,?,?,?,?,0,?,?,?,?,?,?,?)" + "INSERT INTO users (agent_user_id, local_display_name, active_user, is_user_chat_relay, active_order, contact_id, show_ntfs, send_rcpts_contacts, send_rcpts_small_groups, auto_accept_member_contacts, auto_accept_group_invitations, client_service, created_at, updated_at) VALUES (?,?,?,?,?,0,?,?,?,?,?,?,?,?)" ( (auId, displayName, BI activeUser, BI userChatRelay, order) - :. (BI showNtfs, BI sendRcptsContacts, BI sendRcptsSmallGroups, BI autoAcceptMemberContacts, BI clientService, currentTs, currentTs) + :. (BI showNtfs, BI sendRcptsContacts, BI sendRcptsSmallGroups, BI autoAcceptMemberContacts, BI autoAcceptGroupInvitations, BI clientService, currentTs, currentTs) ) userId <- insertedRowId db -- After the insert: the name is unique in users, so a duplicate fails @@ -165,7 +167,7 @@ createUserRecordAt db (AgentUserId auId) userChatRelay clientService Profile {di (profileId, displayName, userId, BI True, currentTs, currentTs, currentTs) contactId <- insertedRowId db DB.execute db "UPDATE users SET contact_id = ? WHERE user_id = ?" (contactId, userId) - pure $ toUser currentTs $ (userId, auId, contactId, profileId, BI activeUser, order) :. (displayName, fullName, shortDescr, description, image, Nothing, peerType, userPreferences) :. (BI showNtfs, BI sendRcptsContacts, BI sendRcptsSmallGroups, BI autoAcceptMemberContacts, Nothing, Nothing, Nothing, BI userChatRelay, BI clientService, Nothing) :. localBadgeToRow Nothing :. (Nothing, Nothing, Nothing) + pure $ toUser currentTs $ (userId, auId, contactId, profileId, BI activeUser, order) :. (displayName, fullName, shortDescr, description, image, Nothing, peerType, userPreferences) :. (BI showNtfs, BI sendRcptsContacts, BI sendRcptsSmallGroups, BI autoAcceptMemberContacts, BI autoAcceptGroupInvitations, Nothing, Nothing, Nothing, BI userChatRelay, BI clientService, Nothing) :. localBadgeToRow Nothing :. (Nothing, Nothing, Nothing) -- TODO [mentions] getUsersInfo :: DB.Connection -> IO [UserInfo] @@ -330,6 +332,10 @@ updateUserAutoAcceptMemberContacts :: DB.Connection -> User -> Bool -> IO () updateUserAutoAcceptMemberContacts db User {userId} autoAccept = DB.execute db "UPDATE users SET auto_accept_member_contacts = ? WHERE user_id = ?" (BI autoAccept, userId) +updateUserAutoAcceptGroupInvitations :: DB.Connection -> User -> Bool -> IO () +updateUserAutoAcceptGroupInvitations db User {userId} autoAccept = + DB.execute db "UPDATE users SET auto_accept_group_invitations = ? WHERE user_id = ?" (BI autoAccept, userId) + updateUserProfile :: DB.Connection -> User -> Profile -> ExceptT StoreError IO User updateUserProfile db user p' | displayName == newName = liftIO $ do diff --git a/src/Simplex/Chat/Store/SQLite/Migrations.hs b/src/Simplex/Chat/Store/SQLite/Migrations.hs index a4e7ab04a2..cb046f6bc5 100644 --- a/src/Simplex/Chat/Store/SQLite/Migrations.hs +++ b/src/Simplex/Chat/Store/SQLite/Migrations.hs @@ -169,6 +169,7 @@ import Simplex.Chat.Store.SQLite.Migrations.M20260715_profile_description import Simplex.Chat.Store.SQLite.Migrations.M20260716_signed_history import Simplex.Chat.Store.SQLite.Migrations.M20260720_server_roles import Simplex.Chat.Store.SQLite.Migrations.M20260723_contact_request_rejection +import Simplex.Chat.Store.SQLite.Migrations.M20260813_auto_accept_group_invitations import Simplex.Messaging.Agent.Store.Shared (Migration (..)) schemaMigrations :: [(String, Query, Maybe Query)] @@ -337,7 +338,8 @@ schemaMigrations = ("20260715_profile_description", m20260715_profile_description, Just down_m20260715_profile_description), ("20260716_signed_history", m20260716_signed_history, Just down_m20260716_signed_history), ("20260720_server_roles", m20260720_server_roles, Just down_m20260720_server_roles), - ("20260723_contact_request_rejection", m20260723_contact_request_rejection, Just down_m20260723_contact_request_rejection) + ("20260723_contact_request_rejection", m20260723_contact_request_rejection, Just down_m20260723_contact_request_rejection), + ("20260813_auto_accept_group_invitations", m20260813_auto_accept_group_invitations, Just down_m20260813_auto_accept_group_invitations) ] -- | The list of migrations in ascending order by date diff --git a/src/Simplex/Chat/Store/SQLite/Migrations/M20260813_auto_accept_group_invitations.hs b/src/Simplex/Chat/Store/SQLite/Migrations/M20260813_auto_accept_group_invitations.hs new file mode 100644 index 0000000000..f0fab81d68 --- /dev/null +++ b/src/Simplex/Chat/Store/SQLite/Migrations/M20260813_auto_accept_group_invitations.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE QuasiQuotes #-} + +module Simplex.Chat.Store.SQLite.Migrations.M20260813_auto_accept_group_invitations where + +import Database.SQLite.Simple (Query) +import Database.SQLite.Simple.QQ (sql) + +m20260813_auto_accept_group_invitations :: Query +m20260813_auto_accept_group_invitations = + [sql| +ALTER TABLE users ADD COLUMN auto_accept_group_invitations INTEGER NOT NULL DEFAULT 0; +|] + +down_m20260813_auto_accept_group_invitations :: Query +down_m20260813_auto_accept_group_invitations = + [sql| +ALTER TABLE users DROP COLUMN auto_accept_group_invitations; +|] diff --git a/src/Simplex/Chat/Store/SQLite/Migrations/chat_query_plans.txt b/src/Simplex/Chat/Store/SQLite/Migrations/chat_query_plans.txt index f4dcb5c5a7..2edce7cc3c 100644 --- a/src/Simplex/Chat/Store/SQLite/Migrations/chat_query_plans.txt +++ b/src/Simplex/Chat/Store/SQLite/Migrations/chat_query_plans.txt @@ -6185,7 +6185,7 @@ SEARCH server_operators USING INTEGER PRIMARY KEY (rowid=?) Query: SELECT u.user_id, u.agent_user_id, u.contact_id, ucp.contact_profile_id, u.active_user, u.active_order, u.local_display_name, ucp.full_name, ucp.short_descr, ucp.description, ucp.image, ucp.contact_link, ucp.chat_peer_type, ucp.preferences, - u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, + u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.auto_accept_group_invitations, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, ucp.badge_proof, ucp.badge_pres_header, ucp.badge_expiry, ucp.badge_type, ucp.badge_verified, ucp.badge_extra, ucp.badge_master_key, ucp.badge_signature, ucp.badge_key_idx, ucp.contact_domain, ucp.contact_domain_proof, ucp.contact_domain_verified FROM users u JOIN contacts uct ON uct.contact_id = u.contact_id @@ -6198,7 +6198,7 @@ SEARCH ucp USING INTEGER PRIMARY KEY (rowid=?) Query: SELECT u.user_id, u.agent_user_id, u.contact_id, ucp.contact_profile_id, u.active_user, u.active_order, u.local_display_name, ucp.full_name, ucp.short_descr, ucp.description, ucp.image, ucp.contact_link, ucp.chat_peer_type, ucp.preferences, - u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, + u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.auto_accept_group_invitations, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, ucp.badge_proof, ucp.badge_pres_header, ucp.badge_expiry, ucp.badge_type, ucp.badge_verified, ucp.badge_extra, ucp.badge_master_key, ucp.badge_signature, ucp.badge_key_idx, ucp.contact_domain, ucp.contact_domain_proof, ucp.contact_domain_verified FROM users u JOIN contacts uct ON uct.contact_id = u.contact_id @@ -6212,7 +6212,7 @@ SEARCH ucp USING INTEGER PRIMARY KEY (rowid=?) Query: SELECT u.user_id, u.agent_user_id, u.contact_id, ucp.contact_profile_id, u.active_user, u.active_order, u.local_display_name, ucp.full_name, ucp.short_descr, ucp.description, ucp.image, ucp.contact_link, ucp.chat_peer_type, ucp.preferences, - u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, + u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.auto_accept_group_invitations, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, ucp.badge_proof, ucp.badge_pres_header, ucp.badge_expiry, ucp.badge_type, ucp.badge_verified, ucp.badge_extra, ucp.badge_master_key, ucp.badge_signature, ucp.badge_key_idx, ucp.contact_domain, ucp.contact_domain_proof, ucp.contact_domain_verified FROM users u JOIN contacts uct ON uct.contact_id = u.contact_id @@ -6226,7 +6226,7 @@ SEARCH ucp USING INTEGER PRIMARY KEY (rowid=?) Query: SELECT u.user_id, u.agent_user_id, u.contact_id, ucp.contact_profile_id, u.active_user, u.active_order, u.local_display_name, ucp.full_name, ucp.short_descr, ucp.description, ucp.image, ucp.contact_link, ucp.chat_peer_type, ucp.preferences, - u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, + u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.auto_accept_group_invitations, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, ucp.badge_proof, ucp.badge_pres_header, ucp.badge_expiry, ucp.badge_type, ucp.badge_verified, ucp.badge_extra, ucp.badge_master_key, ucp.badge_signature, ucp.badge_key_idx, ucp.contact_domain, ucp.contact_domain_proof, ucp.contact_domain_verified FROM users u JOIN contacts uct ON uct.contact_id = u.contact_id @@ -6241,7 +6241,7 @@ SEARCH ucp USING INTEGER PRIMARY KEY (rowid=?) Query: SELECT u.user_id, u.agent_user_id, u.contact_id, ucp.contact_profile_id, u.active_user, u.active_order, u.local_display_name, ucp.full_name, ucp.short_descr, ucp.description, ucp.image, ucp.contact_link, ucp.chat_peer_type, ucp.preferences, - u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, + u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.auto_accept_group_invitations, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, ucp.badge_proof, ucp.badge_pres_header, ucp.badge_expiry, ucp.badge_type, ucp.badge_verified, ucp.badge_extra, ucp.badge_master_key, ucp.badge_signature, ucp.badge_key_idx, ucp.contact_domain, ucp.contact_domain_proof, ucp.contact_domain_verified FROM users u JOIN contacts uct ON uct.contact_id = u.contact_id @@ -6255,7 +6255,7 @@ SEARCH ucp USING INTEGER PRIMARY KEY (rowid=?) Query: SELECT u.user_id, u.agent_user_id, u.contact_id, ucp.contact_profile_id, u.active_user, u.active_order, u.local_display_name, ucp.full_name, ucp.short_descr, ucp.description, ucp.image, ucp.contact_link, ucp.chat_peer_type, ucp.preferences, - u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, + u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.auto_accept_group_invitations, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, ucp.badge_proof, ucp.badge_pres_header, ucp.badge_expiry, ucp.badge_type, ucp.badge_verified, ucp.badge_extra, ucp.badge_master_key, ucp.badge_signature, ucp.badge_key_idx, ucp.contact_domain, ucp.contact_domain_proof, ucp.contact_domain_verified FROM users u JOIN contacts uct ON uct.contact_id = u.contact_id @@ -6269,7 +6269,7 @@ SEARCH ucp USING INTEGER PRIMARY KEY (rowid=?) Query: SELECT u.user_id, u.agent_user_id, u.contact_id, ucp.contact_profile_id, u.active_user, u.active_order, u.local_display_name, ucp.full_name, ucp.short_descr, ucp.description, ucp.image, ucp.contact_link, ucp.chat_peer_type, ucp.preferences, - u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, + u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.auto_accept_group_invitations, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, ucp.badge_proof, ucp.badge_pres_header, ucp.badge_expiry, ucp.badge_type, ucp.badge_verified, ucp.badge_extra, ucp.badge_master_key, ucp.badge_signature, ucp.badge_key_idx, ucp.contact_domain, ucp.contact_domain_proof, ucp.contact_domain_verified FROM users u JOIN contacts uct ON uct.contact_id = u.contact_id @@ -6283,7 +6283,7 @@ SEARCH ucp USING INTEGER PRIMARY KEY (rowid=?) Query: SELECT u.user_id, u.agent_user_id, u.contact_id, ucp.contact_profile_id, u.active_user, u.active_order, u.local_display_name, ucp.full_name, ucp.short_descr, ucp.description, ucp.image, ucp.contact_link, ucp.chat_peer_type, ucp.preferences, - u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, + u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.auto_accept_group_invitations, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, ucp.badge_proof, ucp.badge_pres_header, ucp.badge_expiry, ucp.badge_type, ucp.badge_verified, ucp.badge_extra, ucp.badge_master_key, ucp.badge_signature, ucp.badge_key_idx, ucp.contact_domain, ucp.contact_domain_proof, ucp.contact_domain_verified FROM users u JOIN contacts uct ON uct.contact_id = u.contact_id @@ -6297,7 +6297,7 @@ SEARCH ucp USING INTEGER PRIMARY KEY (rowid=?) Query: SELECT u.user_id, u.agent_user_id, u.contact_id, ucp.contact_profile_id, u.active_user, u.active_order, u.local_display_name, ucp.full_name, ucp.short_descr, ucp.description, ucp.image, ucp.contact_link, ucp.chat_peer_type, ucp.preferences, - u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, + u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.auto_accept_group_invitations, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, ucp.badge_proof, ucp.badge_pres_header, ucp.badge_expiry, ucp.badge_type, ucp.badge_verified, ucp.badge_extra, ucp.badge_master_key, ucp.badge_signature, ucp.badge_key_idx, ucp.contact_domain, ucp.contact_domain_proof, ucp.contact_domain_verified FROM users u JOIN contacts uct ON uct.contact_id = u.contact_id @@ -6310,7 +6310,7 @@ SEARCH ucp USING INTEGER PRIMARY KEY (rowid=?) Query: SELECT u.user_id, u.agent_user_id, u.contact_id, ucp.contact_profile_id, u.active_user, u.active_order, u.local_display_name, ucp.full_name, ucp.short_descr, ucp.description, ucp.image, ucp.contact_link, ucp.chat_peer_type, ucp.preferences, - u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, + u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.auto_accept_group_invitations, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, ucp.badge_proof, ucp.badge_pres_header, ucp.badge_expiry, ucp.badge_type, ucp.badge_verified, ucp.badge_extra, ucp.badge_master_key, ucp.badge_signature, ucp.badge_key_idx, ucp.contact_domain, ucp.contact_domain_proof, ucp.contact_domain_verified FROM users u JOIN contacts uct ON uct.contact_id = u.contact_id @@ -7069,7 +7069,7 @@ Plan: Query: INSERT INTO user_contact_links (user_id, group_id, group_link_id, local_display_name, conn_req_contact, short_link_contact, short_link_data_set, short_link_large_data_set, group_link_member_role, auto_accept, created_at, updated_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?) Plan: -Query: INSERT INTO users (agent_user_id, local_display_name, active_user, is_user_chat_relay, active_order, contact_id, show_ntfs, send_rcpts_contacts, send_rcpts_small_groups, auto_accept_member_contacts, client_service, created_at, updated_at) VALUES (?,?,?,?,?,0,?,?,?,?,?,?,?) +Query: INSERT INTO users (agent_user_id, local_display_name, active_user, is_user_chat_relay, active_order, contact_id, show_ntfs, send_rcpts_contacts, send_rcpts_small_groups, auto_accept_member_contacts, auto_accept_group_invitations, client_service, created_at, updated_at) VALUES (?,?,?,?,?,0,?,?,?,?,?,?,?,?) Plan: Query: INSERT INTO xftp_file_descriptions (user_id, file_descr_text, file_descr_part_no, file_descr_complete, created_at, updated_at) VALUES (?,?,?,?,?,?) @@ -7939,6 +7939,10 @@ Query: UPDATE users SET active_user = 1, active_order = ? WHERE user_id = ? Plan: SEARCH users USING INTEGER PRIMARY KEY (rowid=?) +Query: UPDATE users SET auto_accept_group_invitations = ? WHERE user_id = ? +Plan: +SEARCH users USING INTEGER PRIMARY KEY (rowid=?) + Query: UPDATE users SET auto_accept_member_contacts = ? WHERE user_id = ? Plan: SEARCH users USING INTEGER PRIMARY KEY (rowid=?) diff --git a/src/Simplex/Chat/Store/SQLite/Migrations/chat_schema.sql b/src/Simplex/Chat/Store/SQLite/Migrations/chat_schema.sql index cfbcf70599..a49a6d0db7 100644 --- a/src/Simplex/Chat/Store/SQLite/Migrations/chat_schema.sql +++ b/src/Simplex/Chat/Store/SQLite/Migrations/chat_schema.sql @@ -53,7 +53,8 @@ CREATE TABLE users( active_order INTEGER NOT NULL DEFAULT 0, auto_accept_member_contacts INTEGER NOT NULL DEFAULT 0, is_user_chat_relay INTEGER NOT NULL DEFAULT 0, - client_service INTEGER NOT NULL DEFAULT 0, -- 1 for active user + client_service INTEGER NOT NULL DEFAULT 0, + auto_accept_group_invitations INTEGER NOT NULL DEFAULT 0, -- 1 for active user FOREIGN KEY(user_id, local_display_name) REFERENCES display_names(user_id, local_display_name) ON DELETE RESTRICT diff --git a/src/Simplex/Chat/Store/Shared.hs b/src/Simplex/Chat/Store/Shared.hs index 6516b3cc66..ceaf905df0 100644 --- a/src/Simplex/Chat/Store/Shared.hs +++ b/src/Simplex/Chat/Store/Shared.hs @@ -557,20 +557,21 @@ userQuery :: Query userQuery = [sql| SELECT u.user_id, u.agent_user_id, u.contact_id, ucp.contact_profile_id, u.active_user, u.active_order, u.local_display_name, ucp.full_name, ucp.short_descr, ucp.description, ucp.image, ucp.contact_link, ucp.chat_peer_type, ucp.preferences, - u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, + u.show_ntfs, u.send_rcpts_contacts, u.send_rcpts_small_groups, u.auto_accept_member_contacts, u.auto_accept_group_invitations, u.view_pwd_hash, u.view_pwd_salt, u.user_member_profile_updated_at, u.is_user_chat_relay, u.client_service, u.ui_themes, ucp.badge_proof, ucp.badge_pres_header, ucp.badge_expiry, ucp.badge_type, ucp.badge_verified, ucp.badge_extra, ucp.badge_master_key, ucp.badge_signature, ucp.badge_key_idx, ucp.contact_domain, ucp.contact_domain_proof, ucp.contact_domain_verified FROM users u JOIN contacts uct ON uct.contact_id = u.contact_id JOIN contact_profiles ucp ON ucp.contact_profile_id = uct.contact_profile_id |] -toUser :: UTCTime -> (UserId, UserId, ContactId, ProfileId, BoolInt, Int64) :. (ContactName, Text, Maybe Text, Maybe Text, Maybe ImageData, Maybe ConnLinkContact, Maybe ChatPeerType, Maybe Preferences) :. (BoolInt, BoolInt, BoolInt, BoolInt, Maybe B64UrlByteString, Maybe B64UrlByteString, Maybe UTCTime, BoolInt, BoolInt, Maybe UIThemeEntityOverrides) :. BadgeRow :. ContactDomainRow -> User -toUser now ((userId, auId, userContactId, profileId, BI activeUser, activeOrder) :. (displayName, fullName, shortDescr, description, image, contactLink, peerType, userPreferences) :. (BI showNtfs, BI sendRcptsContacts, BI sendRcptsSmallGroups, BI autoAcceptMemberContacts, viewPwdHash_, viewPwdSalt_, userMemberProfileUpdatedAt, BI userChatRelay, BI clientService, uiThemes) :. badgeRow :. domainRow) = - User {userId, agentUserId = AgentUserId auId, userContactId, localDisplayName = displayName, profile, activeUser, activeOrder, fullPreferences, showNtfs, sendRcptsContacts, sendRcptsSmallGroups, autoAcceptMemberContacts, viewPwdHash, userMemberProfileUpdatedAt, userChatRelay = BoolDef userChatRelay, clientService = BoolDef clientService, uiThemes} +toUser :: UTCTime -> (UserId, UserId, ContactId, ProfileId, BoolInt, Int64) :. (ContactName, Text, Maybe Text, Maybe Text, Maybe ImageData, Maybe ConnLinkContact, Maybe ChatPeerType, Maybe Preferences) :. (BoolInt, BoolInt, BoolInt, BoolInt, BoolInt, Maybe B64UrlByteString, Maybe B64UrlByteString, Maybe UTCTime, BoolInt, BoolInt, Maybe UIThemeEntityOverrides) :. BadgeRow :. ContactDomainRow -> User +toUser now ((userId, auId, userContactId, profileId, BI activeUser, activeOrder) :. (displayName, fullName, shortDescr, description, image, contactLink, peerType, userPreferences) :. (BI showNtfs, BI sendRcptsContacts, BI sendRcptsSmallGroups, BI autoAcceptMemberContacts, BI autoAcceptGroupInv, viewPwdHash_, viewPwdSalt_, userMemberProfileUpdatedAt, BI userChatRelay, BI clientService, uiThemes) :. badgeRow :. domainRow) = + User {userId, agentUserId = AgentUserId auId, userContactId, localDisplayName = displayName, profile, activeUser, activeOrder, fullPreferences, showNtfs, sendRcptsContacts, sendRcptsSmallGroups, autoAcceptMemberContacts, autoAcceptGroupInvitations, viewPwdHash, userMemberProfileUpdatedAt, userChatRelay = BoolDef userChatRelay, clientService = BoolDef clientService, uiThemes} where profile = LocalProfile {profileId, displayName, fullName, shortDescr, description, image, contactLink, contactDomain = rowToContactDomain domainRow, contactDomainVerified = rowToDomainVerified domainRow, peerType, localBadge = rowToBadge now badgeRow, preferences = userPreferences, localAlias = ""} fullPreferences = fullPreferences' userPreferences viewPwdHash = UserPwdHash <$> viewPwdHash_ <*> viewPwdSalt_ + autoAcceptGroupInvitations = BoolDef autoAcceptGroupInv toPendingContactConnection :: (Int64, ConnId, ConnStatus, Maybe ByteString, Maybe Int64, Maybe GroupLinkId, Maybe Int64, Maybe ConnReqInvitation, Maybe ShortLinkInvitation, LocalAlias, UTCTime, UTCTime) -> PendingContactConnection toPendingContactConnection (pccConnId, acId, pccConnStatus, connReqHash, viaUserContactLink, groupLinkId, customUserProfileId, connReqInv, shortLinkInv, localAlias, createdAt, updatedAt) = diff --git a/src/Simplex/Chat/Types.hs b/src/Simplex/Chat/Types.hs index 7bccd04b71..c0e44277a4 100644 --- a/src/Simplex/Chat/Types.hs +++ b/src/Simplex/Chat/Types.hs @@ -143,6 +143,7 @@ data User = User sendRcptsContacts :: Bool, sendRcptsSmallGroups :: Bool, autoAcceptMemberContacts :: Bool, + autoAcceptGroupInvitations :: BoolDef, userMemberProfileUpdatedAt :: Maybe UTCTime, userChatRelay :: BoolDef, clientService :: BoolDef, diff --git a/tests/ChatTests/Profiles.hs b/tests/ChatTests/Profiles.hs index c65306474c..ce62b300e4 100644 --- a/tests/ChatTests/Profiles.hs +++ b/tests/ChatTests/Profiles.hs @@ -52,6 +52,9 @@ chatProfileTests = do it "reject profile image that is too large" testSetProfileImageTooLarge it "set profile image from file" testSetProfileImageFromFile it "use multiword profile names" testMultiWordProfileNames + it "auto-accept group invitations" testAutoAcceptGroupInvitations + it "auto-accept group invitations on a second profile" testAutoAcceptGroupInvitationsSecondProfile + it "auto-accept group invitations on an inactive profile" testAutoAcceptGroupInvitationsInactiveProfile it "present supporter badge to contacts" testUserBadgeBroadcast it "supporter badge sent to contact connecting after attach" testUserBadgeOnConnect it "supporter badge sent to member joining via group link" testUserBadgeGroupLink @@ -539,6 +542,61 @@ testSetProfileImageFromFile ps = testChat aliceProfile test ps alice ##> ("/set profile image file " <> emptyPath) alice <##. "bad chat command: image file is empty" +testAutoAcceptGroupInvitations :: HasCallStack => TestParams -> IO () +testAutoAcceptGroupInvitations = + testChat2 aliceProfile bobProfile $ + \alice bob -> do + connectUsers alice bob + bob ##> "/set accept group invitations on" + bob <## "ok" + alice ##> "/g team" + alice <## "group #team is created" + alice <## "to add members use /a team or /create link #team" + alice ##> "/a team bob admin" + alice <## "invitation to join the group #team sent to bob" + concurrently_ + (alice <## "#team: bob joined the group") + (bob <## "#team: you joined the group") + +testAutoAcceptGroupInvitationsSecondProfile :: HasCallStack => TestParams -> IO () +testAutoAcceptGroupInvitationsSecondProfile = + testChat2 aliceProfile bobProfile $ + \alice bob -> do + bob ##> "/create user bob2" + showActiveUser bob "bob2" + bob ##> "/set accept group invitations on" + bob <## "ok" + connectUsers alice bob + alice ##> "/g team" + alice <## "group #team is created" + alice <## "to add members use /a team or /create link #team" + alice ##> "/a team bob2 admin" + alice <## "invitation to join the group #team sent to bob2" + concurrently_ + (alice <## "#team: bob2 joined the group") + (bob <## "#team: you joined the group") + +testAutoAcceptGroupInvitationsInactiveProfile :: HasCallStack => TestParams -> IO () +testAutoAcceptGroupInvitationsInactiveProfile = + testChat2 aliceProfile bobProfile $ + \alice bob -> do + bob ##> "/create user bob2" + showActiveUser bob "bob2" + bob ##> "/set accept group invitations on" + bob <## "ok" + connectUsers alice bob + -- switch away: bob2 now has auto-accept on but is NOT the active profile + bob ##> "/user bob" + showActiveUser bob "bob (Bob)" + alice ##> "/g team" + alice <## "group #team is created" + alice <## "to add members use /a team or /create link #team" + alice ##> "/a team bob2 admin" + alice <## "invitation to join the group #team sent to bob2" + concurrently_ + (alice <## "#team: bob2 joined the group") + (bob <## "[user: bob2] #team: you joined the group") + testMultiWordProfileNames :: HasCallStack => TestParams -> IO () testMultiWordProfileNames = testChat3 aliceProfile' bobProfile' cathProfile' $ diff --git a/tests/JSONFixtures.hs b/tests/JSONFixtures.hs index 37fab0e4f0..bbdf8c14b0 100644 --- a/tests/JSONFixtures.hs +++ b/tests/JSONFixtures.hs @@ -17,10 +17,10 @@ activeUserExistsTagged :: LB.ByteString activeUserExistsTagged = "{\"error\":{\"type\":\"error\",\"errorType\":{\"type\":\"userExists\",\"contactName\":\"alice\"}}}" activeUserSwift :: LB.ByteString -activeUserSwift = "{\"result\":{\"_owsf\":true,\"activeUser\":{\"user\":{\"userId\":1,\"agentUserId\":\"1\",\"userContactId\":1,\"localDisplayName\":\"alice\",\"profile\":{\"profileId\":1,\"displayName\":\"alice\",\"fullName\":\"\",\"shortDescr\":\"Alice\",\"localAlias\":\"\"},\"fullPreferences\":{\"timedMessages\":{\"allow\":\"yes\"},\"fullDelete\":{\"allow\":\"no\"},\"reactions\":{\"allow\":\"yes\"},\"voice\":{\"allow\":\"yes\"},\"files\":{\"allow\":\"always\"},\"calls\":{\"allow\":\"yes\"},\"sessions\":{\"allow\":\"no\"},\"commands\":[]},\"activeUser\":true,\"activeOrder\":1,\"showNtfs\":true,\"sendRcptsContacts\":true,\"sendRcptsSmallGroups\":true,\"autoAcceptMemberContacts\":false,\"userChatRelay\":false,\"clientService\":false}}}}" +activeUserSwift = "{\"result\":{\"_owsf\":true,\"activeUser\":{\"user\":{\"userId\":1,\"agentUserId\":\"1\",\"userContactId\":1,\"localDisplayName\":\"alice\",\"profile\":{\"profileId\":1,\"displayName\":\"alice\",\"fullName\":\"\",\"shortDescr\":\"Alice\",\"localAlias\":\"\"},\"fullPreferences\":{\"timedMessages\":{\"allow\":\"yes\"},\"fullDelete\":{\"allow\":\"no\"},\"reactions\":{\"allow\":\"yes\"},\"voice\":{\"allow\":\"yes\"},\"files\":{\"allow\":\"always\"},\"calls\":{\"allow\":\"yes\"},\"sessions\":{\"allow\":\"no\"},\"commands\":[]},\"activeUser\":true,\"activeOrder\":1,\"showNtfs\":true,\"sendRcptsContacts\":true,\"sendRcptsSmallGroups\":true,\"autoAcceptMemberContacts\":false,\"autoAcceptGroupInvitations\":false,\"userChatRelay\":false,\"clientService\":false}}}}" activeUserTagged :: LB.ByteString -activeUserTagged = "{\"result\":{\"type\":\"activeUser\",\"user\":{\"userId\":1,\"agentUserId\":\"1\",\"userContactId\":1,\"localDisplayName\":\"alice\",\"profile\":{\"profileId\":1,\"displayName\":\"alice\",\"fullName\":\"\",\"shortDescr\":\"Alice\",\"localAlias\":\"\"},\"fullPreferences\":{\"timedMessages\":{\"allow\":\"yes\"},\"fullDelete\":{\"allow\":\"no\"},\"reactions\":{\"allow\":\"yes\"},\"voice\":{\"allow\":\"yes\"},\"files\":{\"allow\":\"always\"},\"calls\":{\"allow\":\"yes\"},\"sessions\":{\"allow\":\"no\"},\"commands\":[]},\"activeUser\":true,\"activeOrder\":1,\"showNtfs\":true,\"sendRcptsContacts\":true,\"sendRcptsSmallGroups\":true,\"autoAcceptMemberContacts\":false,\"userChatRelay\":false,\"clientService\":false}}}" +activeUserTagged = "{\"result\":{\"type\":\"activeUser\",\"user\":{\"userId\":1,\"agentUserId\":\"1\",\"userContactId\":1,\"localDisplayName\":\"alice\",\"profile\":{\"profileId\":1,\"displayName\":\"alice\",\"fullName\":\"\",\"shortDescr\":\"Alice\",\"localAlias\":\"\"},\"fullPreferences\":{\"timedMessages\":{\"allow\":\"yes\"},\"fullDelete\":{\"allow\":\"no\"},\"reactions\":{\"allow\":\"yes\"},\"voice\":{\"allow\":\"yes\"},\"files\":{\"allow\":\"always\"},\"calls\":{\"allow\":\"yes\"},\"sessions\":{\"allow\":\"no\"},\"commands\":[]},\"activeUser\":true,\"activeOrder\":1,\"showNtfs\":true,\"sendRcptsContacts\":true,\"sendRcptsSmallGroups\":true,\"autoAcceptMemberContacts\":false,\"autoAcceptGroupInvitations\":false,\"userChatRelay\":false,\"clientService\":false}}}" chatStartedSwift :: LB.ByteString chatStartedSwift = "{\"result\":{\"_owsf\":true,\"chatStarted\":{}}}" @@ -35,7 +35,7 @@ connectionsDiffTagged :: LB.ByteString connectionsDiffTagged = "{\"result\":{\"type\":\"connectionsDiff\",\"userIds\":{\"missingIds\":[],\"extraIds\":[]},\"connIds\":{\"missingIds\":[],\"extraIds\":[]}}}" userJSON :: LB.ByteString -userJSON = "{\"userId\":1,\"agentUserId\":\"1\",\"userContactId\":1,\"localDisplayName\":\"alice\",\"profile\":{\"profileId\":1,\"displayName\":\"alice\",\"fullName\":\"\",\"shortDescr\":\"Alice\",\"localAlias\":\"\"},\"fullPreferences\":{\"timedMessages\":{\"allow\":\"yes\"},\"fullDelete\":{\"allow\":\"no\"},\"reactions\":{\"allow\":\"yes\"},\"voice\":{\"allow\":\"yes\"},\"files\":{\"allow\":\"always\"},\"calls\":{\"allow\":\"yes\"},\"sessions\":{\"allow\":\"no\"},\"commands\":[]},\"activeUser\":true,\"activeOrder\":1,\"showNtfs\":true,\"sendRcptsContacts\":true,\"sendRcptsSmallGroups\":true,\"autoAcceptMemberContacts\":false,\"userChatRelay\":false}" +userJSON = "{\"userId\":1,\"agentUserId\":\"1\",\"userContactId\":1,\"localDisplayName\":\"alice\",\"profile\":{\"profileId\":1,\"displayName\":\"alice\",\"fullName\":\"\",\"shortDescr\":\"Alice\",\"localAlias\":\"\"},\"fullPreferences\":{\"timedMessages\":{\"allow\":\"yes\"},\"fullDelete\":{\"allow\":\"no\"},\"reactions\":{\"allow\":\"yes\"},\"voice\":{\"allow\":\"yes\"},\"files\":{\"allow\":\"always\"},\"calls\":{\"allow\":\"yes\"},\"sessions\":{\"allow\":\"no\"},\"commands\":[]},\"activeUser\":true,\"activeOrder\":1,\"showNtfs\":true,\"sendRcptsContacts\":true,\"sendRcptsSmallGroups\":true,\"autoAcceptMemberContacts\":false,\"autoAcceptGroupInvitations\":false,\"userChatRelay\":false}" parsedMarkdownSwift :: LB.ByteString parsedMarkdownSwift = "{\"formattedText\":[{\"format\":{\"_owsf\":true,\"bold\":{}},\"text\":\"hello\"}]}"