diff --git a/src/app/modules/main/communities/controller.nim b/src/app/modules/main/communities/controller.nim index b13fa99de8..9e86d12e54 100644 --- a/src/app/modules/main/communities/controller.nim +++ b/src/app/modules/main/communities/controller.nim @@ -138,8 +138,7 @@ proc createCommunity*( aX: int, aY: int, bX: int, bY: int, historyArchiveSupportEnabled: bool, pinMessageAllMembersEnabled: bool, - bannerJsonStr: string, - encrypted: bool) = + bannerJsonStr: string) = self.communityService.createCommunity( name, description, @@ -152,8 +151,7 @@ proc createCommunity*( aX, aY, bX, bY, historyArchiveSupportEnabled, pinMessageAllMembersEnabled, - bannerJsonStr, - encrypted) + bannerJsonStr) proc requestImportDiscordCommunity*( self: Controller, @@ -169,8 +167,7 @@ proc requestImportDiscordCommunity*( historyArchiveSupportEnabled: bool, pinMessageAllMembersEnabled: bool, filesToImport: seq[string], - fromTimestamp: int, - encrypted: bool) = + fromTimestamp: int) = self.communityService.requestImportDiscordCommunity( name, description, @@ -184,8 +181,7 @@ proc requestImportDiscordCommunity*( historyArchiveSupportEnabled, pinMessageAllMembersEnabled, filesToImport, - fromTimestamp, - encrypted) + fromTimestamp) proc reorderCommunityChat*( self: Controller, diff --git a/src/app/modules/main/communities/io_interface.nim b/src/app/modules/main/communities/io_interface.nim index 64358d4244..1cba5543db 100644 --- a/src/app/modules/main/communities/io_interface.nim +++ b/src/app/modules/main/communities/io_interface.nim @@ -40,14 +40,13 @@ method spectateCommunity*(self: AccessInterface, communityId: string): string {. method createCommunity*(self: AccessInterface, name: string, description, introMessage, outroMessage: string, access: int, color: string, tags: string, imagePath: string, aX: int, aY: int, bX: int, bY: int, - historyArchiveSupportEnabled: bool, pinMessageAllMembersEnabled: bool, bannerJsonStr: string, - encrypted: bool) {.base.} = + historyArchiveSupportEnabled: bool, pinMessageAllMembersEnabled: bool, bannerJsonStr: string) {.base.} = raise newException(ValueError, "No implementation available") method requestImportDiscordCommunity*(self: AccessInterface, name: string, description, introMessage, outroMessage: string, access: int, color: string, tags: string, imagePath: string, aX: int, aY: int, bX: int, bY: int, historyArchiveSupportEnabled: bool, pinMessageAllMembersEnabled: bool, filesToImport: seq[string], - fromTimestamp: int, encrypted: bool) {.base.} = + fromTimestamp: int) {.base.} = raise newException(ValueError, "No implementation available") method deleteCommunityCategory*(self: AccessInterface, communityId: string, categoryId: string) {.base.} = diff --git a/src/app/modules/main/communities/module.nim b/src/app/modules/main/communities/module.nim index 61cccd8885..ce4dd985cb 100644 --- a/src/app/modules/main/communities/module.nim +++ b/src/app/modules/main/communities/module.nim @@ -252,11 +252,10 @@ method createCommunity*(self: Module, name: string, aX: int, aY: int, bX: int, bY: int, historyArchiveSupportEnabled: bool, pinMessageAllMembersEnabled: bool, - bannerJsonStr: string, - encrypted: bool) = + bannerJsonStr: string) = self.controller.createCommunity(name, description, introMessage, outroMessage, access, color, tags, imagePath, aX, aY, bX, bY, historyArchiveSupportEnabled, pinMessageAllMembersEnabled, - bannerJsonStr, encrypted) + bannerJsonStr) method deleteCommunityCategory*(self: Module, communityId: string, categoryId: string) = self.controller.deleteCommunityCategory(communityId, categoryId) @@ -339,9 +338,9 @@ method requestExtractDiscordChannelsAndCategories*(self: Module, filesToImport: method requestImportDiscordCommunity*(self: Module, name: string, description, introMessage, outroMessage: string, access: int, color: string, tags: string, imagePath: string, aX: int, aY: int, bX: int, bY: int, historyArchiveSupportEnabled: bool, pinMessageAllMembersEnabled: bool, filesToImport: seq[string], - fromTimestamp: int, encrypted: bool) = + fromTimestamp: int) = self.view.setDiscordImportHasCommunityImage(imagePath != "") - self.controller.requestImportDiscordCommunity(name, description, introMessage, outroMessage, access, color, tags, imagePath, aX, aY, bX, bY, historyArchiveSupportEnabled, pinMessageAllMembersEnabled, filesToImport, fromTimestamp, encrypted) + self.controller.requestImportDiscordCommunity(name, description, introMessage, outroMessage, access, color, tags, imagePath, aX, aY, bX, bY, historyArchiveSupportEnabled, pinMessageAllMembersEnabled, filesToImport, fromTimestamp) proc getDiscordImportTaskItem(self: Module, t: DiscordImportTaskProgress): DiscordImportTaskItem = return initDiscordImportTaskItem( diff --git a/src/app/modules/main/communities/view.nim b/src/app/modules/main/communities/view.nim index 88ec78a9a3..b3a24a45a3 100644 --- a/src/app/modules/main/communities/view.nim +++ b/src/app/modules/main/communities/view.nim @@ -421,11 +421,10 @@ QtObject: imagePath: string, aX: int, aY: int, bX: int, bY: int, historyArchiveSupportEnabled: bool, - pinMessageAllMembersEnabled: bool, bannerJsonStr: string, - encrypted: bool) {.slot.} = + pinMessageAllMembersEnabled: bool, bannerJsonStr: string) {.slot.} = self.delegate.createCommunity(name, description, introMessage, outroMessage, access, color, tags, imagePath, aX, aY, bX, bY, historyArchiveSupportEnabled, pinMessageAllMembersEnabled, - bannerJsonStr, encrypted) + bannerJsonStr) proc clearFileList*(self: View) {.slot.} = self.discordFileListModel.clearItems() @@ -459,7 +458,7 @@ QtObject: aX: int, aY: int, bX: int, bY: int, historyArchiveSupportEnabled: bool, pinMessageAllMembersEnabled: bool, - fromTimestamp: int, encrypted: bool) {.slot.} = + fromTimestamp: int) {.slot.} = let selectedItems = self.discordChannelsModel.getSelectedItems() var filesToImport: seq[string] = @[] @@ -470,7 +469,7 @@ QtObject: self.setDiscordImportInProgress(true) self.delegate.requestImportDiscordCommunity(name, description, introMessage, outroMessage, access, color, tags, imagePath, aX, aY, bX, bY, historyArchiveSupportEnabled, pinMessageAllMembersEnabled, - filesToImport, fromTimestamp, encrypted) + filesToImport, fromTimestamp) proc deleteCommunityCategory*(self: View, communityId: string, categoryId: string): string {.slot.} = self.delegate.deleteCommunityCategory(communityId, categoryId) diff --git a/src/app_service/service/community/service.nim b/src/app_service/service/community/service.nim index 89c3422994..b7e0a704b1 100644 --- a/src/app_service/service/community/service.nim +++ b/src/app_service/service/community/service.nim @@ -911,8 +911,7 @@ QtObject: historyArchiveSupportEnabled: bool, pinMessageAllMembersEnabled: bool, filesToImport: seq[string], - fromTimestamp: int, - encrypted: bool) = + fromTimestamp: int) = try: var image = singletonInstance.utils.formatImagePath(imageUrl) var tagsString = tags @@ -932,8 +931,7 @@ QtObject: historyArchiveSupportEnabled, pinMessageAllMembersEnabled, filesToImport, - fromTimestamp, - encrypted) + fromTimestamp) if response.error != nil: let error = Json.decode($response.error, RpcError) @@ -955,8 +953,7 @@ QtObject: aX: int, aY: int, bX: int, bY: int, historyArchiveSupportEnabled: bool, pinMessageAllMembersEnabled: bool, - bannerJsonStr: string, - encrypted: bool) = + bannerJsonStr: string) = try: var bannerJson = bannerJsonStr.parseJson bannerJson{"imagePath"} = newJString(singletonInstance.utils.formatImagePath(bannerJson["imagePath"].getStr)) @@ -976,8 +973,7 @@ QtObject: aX, aY, bX, bY, historyArchiveSupportEnabled, pinMessageAllMembersEnabled, - $bannerJson, - encrypted) + $bannerJson) if response.error != nil: let error = Json.decode($response.error, RpcError) diff --git a/src/backend/communities.nim b/src/backend/communities.nim index 76de2466e6..e882542a37 100644 --- a/src/backend/communities.nim +++ b/src/backend/communities.nim @@ -70,8 +70,7 @@ proc createCommunity*( aX: int, aY: int, bX: int, bY: int, historyArchiveSupportEnabled: bool, pinMessageAllMembersEnabled: bool, - bannerJsonStr: string, - encrypted: bool + bannerJsonStr: string ): RpcResponse[JsonNode] {.raises: [Exception].} = let bannerImage = newCroppedImage(bannerJsonStr) result = callPrivateRPC("createCommunity".prefix, %*[{ @@ -91,8 +90,7 @@ proc createCommunity*( "imageBy": bY, "historyArchiveSupportEnabled": historyArchiveSupportEnabled, "pinMessageAllMembersEnabled": pinMessageAllMembersEnabled, - "banner": bannerImage, - "encrypted": encrypted + "banner": bannerImage }]) proc editCommunity*( @@ -131,7 +129,7 @@ proc editCommunity*( "imageBy": bY, "banner": bannerImage, "historyArchiveSupportEnabled": historyArchiveSupportEnabled, - "pinMessageAllMembersEnabled": pinMessageAllMembersEnabled + "pinMessageAllMembersEnabled": pinMessageAllMembersEnabled, }]) proc requestImportDiscordCommunity*( @@ -148,7 +146,6 @@ proc requestImportDiscordCommunity*( pinMessageAllMembersEnabled: bool, filesToImport: seq[string], fromTimestamp: int, - encrypted: bool, ): RpcResponse[JsonNode] {.raises: [Exception].} = result = callPrivateRPC("requestImportDiscordCommunity".prefix, %*[{ # TODO this will need to be renamed membership (small m) @@ -168,8 +165,7 @@ proc requestImportDiscordCommunity*( "historyArchiveSupportEnabled": historyArchiveSupportEnabled, "pinMessageAllMembersEnabled": pinMessageAllMembersEnabled, "from": fromTimestamp, - "filesToImport": filesToImport, - "encrypted": encrypted, + "filesToImport": filesToImport }]) proc createCommunityTokenPermission*(communityId: string, permissionType: int, tokenCriteria: string, isPrivate: bool): RpcResponse[JsonNode] {.raises: [Exception].} = diff --git a/ui/app/AppLayouts/Chat/controls/community/CommunityOptions.qml b/ui/app/AppLayouts/Chat/controls/community/CommunityOptions.qml index 8ac9eedc6c..37d32e3a14 100644 --- a/ui/app/AppLayouts/Chat/controls/community/CommunityOptions.qml +++ b/ui/app/AppLayouts/Chat/controls/community/CommunityOptions.qml @@ -12,9 +12,6 @@ Column { property alias archiveSupportEnabled: archiveSupportToggle.checked property alias requestToJoinEnabled: requestToJoinToggle.checked property alias pinMessagesEnabled: pinMessagesToggle.checked - property alias encrypted: encryptedToggle.checked - - property bool encryptReadOnly: false spacing: 0 @@ -76,24 +73,4 @@ Column { id: pinMessagesToggle } } - - RowLayout { - width: visible ? parent.width : 0 - height: visible ? d.optionHeight : 0 - visible: requestToJoinToggle.checked - - StatusBaseText { - Layout.fillWidth: true - text: qsTr("Encrypted") - TapHandler { - enabled: !encryptReadOnly - onTapped: encryptedToggle.toggle() - } - } - - StatusCheckBox { - id: encryptedToggle - enabled: !encryptReadOnly - } - } } diff --git a/ui/app/AppLayouts/Chat/panels/communities/CommunityOverviewSettingsPanel.qml b/ui/app/AppLayouts/Chat/panels/communities/CommunityOverviewSettingsPanel.qml index 65dd1213c1..02c96496df 100644 --- a/ui/app/AppLayouts/Chat/panels/communities/CommunityOverviewSettingsPanel.qml +++ b/ui/app/AppLayouts/Chat/panels/communities/CommunityOverviewSettingsPanel.qml @@ -29,7 +29,6 @@ StackLayout { property bool archiveSupportEnabled property bool requestToJoinEnabled property bool pinMessagesEnabled - property bool encrypted property string previousPageName: (currentIndex === 1) ? qsTr("Overview") : "" property bool editable: false @@ -188,8 +187,6 @@ StackLayout { archiveSupportEnabled: root.archiveSupportEnabled requestToJoinEnabled: root.requestToJoinEnabled pinMessagesEnabled: root.pinMessagesEnabled - encrypted: root.encrypted - encryptReadOnly: true } bottomReservedSpace: editCommunityPage.settingsDirtyToastMessageImplicitSize diff --git a/ui/app/AppLayouts/Chat/views/CommunitySettingsView.qml b/ui/app/AppLayouts/Chat/views/CommunitySettingsView.qml index fe228a6e4d..f029942a93 100644 --- a/ui/app/AppLayouts/Chat/views/CommunitySettingsView.qml +++ b/ui/app/AppLayouts/Chat/views/CommunitySettingsView.qml @@ -174,7 +174,6 @@ StatusSectionLayout { tags: root.rootStore.communityTags selectedTags: root.filteredSelectedTags archiveSupportEnabled: root.community.historyArchiveSupportEnabled - encrypted: root.community.encrypted requestToJoinEnabled: root.community.access === Constants.communityChatOnRequestAccess pinMessagesEnabled: root.community.pinMessageAllMembersEnabled editable: root.community.amISectionAdmin diff --git a/ui/app/AppLayouts/CommunitiesPortal/popups/CreateCommunityPopup.qml b/ui/app/AppLayouts/CommunitiesPortal/popups/CreateCommunityPopup.qml index cac9155a69..c9fc506e6b 100644 --- a/ui/app/AppLayouts/CommunitiesPortal/popups/CreateCommunityPopup.qml +++ b/ui/app/AppLayouts/CommunitiesPortal/popups/CreateCommunityPopup.qml @@ -509,7 +509,6 @@ StatusStackModal { historyArchiveSupportEnabled: options.archiveSupportEnabled, checkedMembership: options.requestToJoinEnabled ? Constants.communityChatOnRequestAccess : Constants.communityChatPublicAccess, pinMessagesAllowedForMembers: options.pinMessagesEnabled, - encrypted: options.requestToJoinEnabled && options.encrypted // Only communities with memberships can be encrypted }, bannerJsonStr: JSON.stringify({imagePath: String(bannerPicker.source).replace("file://", ""), cropRect: bannerPicker.cropRect}) } diff --git a/ui/app/AppLayouts/CommunitiesPortal/stores/CommunitiesStore.qml b/ui/app/AppLayouts/CommunitiesPortal/stores/CommunitiesStore.qml index 3e86f7a5b8..dec520ae27 100644 --- a/ui/app/AppLayouts/CommunitiesPortal/stores/CommunitiesStore.qml +++ b/ui/app/AppLayouts/CommunitiesPortal/stores/CommunitiesStore.qml @@ -161,14 +161,13 @@ QtObject { historyArchiveSupportEnabled: false, checkedMembership: false, pinMessagesAllowedForMembers: false, - encrypted: false } }, from = 0) { return communitiesModuleInst.requestImportDiscordCommunity( args.name, args.description, args.introMessage, args.outroMessage, args.options.checkedMembership, args.color, args.tags, args.image.src, args.image.AX, args.image.AY, args.image.BX, args.image.BY, - args.options.historyArchiveSupportEnabled, args.options.pinMessagesAllowedForMembers, from, args.options.encrypted); + args.options.historyArchiveSupportEnabled, args.options.pinMessagesAllowedForMembers, from); } diff --git a/vendor/status-go b/vendor/status-go index e7fbc191f4..57b2432290 160000 --- a/vendor/status-go +++ b/vendor/status-go @@ -1 +1 @@ -Subproject commit e7fbc191f4916f5801704ed9b6a06c738019a73e +Subproject commit 57b2432290347f15e0e452e6a38d76acef601bc5