diff --git a/LIBCWTCH-GO-MACOS.version b/LIBCWTCH-GO-MACOS.version index 76fba53c..73b9cbd2 100644 --- a/LIBCWTCH-GO-MACOS.version +++ b/LIBCWTCH-GO-MACOS.version @@ -1 +1 @@ -2021-12-18-20-32-v1.5.1 \ No newline at end of file +2021-12-19-15-59-v1.5.1-6-g95c3670 \ No newline at end of file diff --git a/LIBCWTCH-GO.version b/LIBCWTCH-GO.version index d7e07e7c..8ba39ef3 100644 --- a/LIBCWTCH-GO.version +++ b/LIBCWTCH-GO.version @@ -1 +1 @@ -2021-12-19-01-32-v1.5.1 \ No newline at end of file +2021-12-19-20-58-v1.5.1-6-g95c3670 \ No newline at end of file diff --git a/android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt b/android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt index ed5283d8..19965a88 100644 --- a/android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt +++ b/android/app/src/main/kotlin/im/cwtch/flwtch/FlwtchWorker.kt @@ -180,6 +180,13 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) : val pass = (a.get("pass") as? String) ?: "" Cwtch.loadProfiles(pass) } + "ChangePassword" -> { + val profile = (a.get("ProfileOnion") as? String) ?: "" + val pass = (a.get("OldPass") as? String) ?: "" + val passNew = (a.get("NewPass") as? String) ?: "" + val passNew2 = (a.get("NewPassAgain") as? String) ?: "" + Cwtch.changePassword(profile, pass, passNew, passNew2) + } "GetMessage" -> { val profile = (a.get("ProfileOnion") as? String) ?: "" val conversation = a.getInt("conversation").toLong() diff --git a/lib/cwtch/cwtchNotifier.dart b/lib/cwtch/cwtchNotifier.dart index c284d08d..3c433904 100644 --- a/lib/cwtch/cwtchNotifier.dart +++ b/lib/cwtch/cwtchNotifier.dart @@ -229,14 +229,9 @@ class CwtchNotifier { EnvironmentConfig.debugLog("new message from group from yourself - this should not happen"); } break; - case "SendMessageToPeerError": - // Ignore dealt with by IndexedFailure - break; - case "SendMessageToGroupError": - // Ignore dealt with by IndexedFailure - break; case "IndexedFailure": - var contact = profileCN.getProfile(data["ProfileOnion"])?.contactList.findContact(data["RemotePeer"]); + var identifier = int.parse(data["ConversationID"]); + var contact = profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier); var idx = int.parse(data["Index"]); var key = contact?.getMessageKeyOrFail(contact.identifier, idx); if (key != null) { @@ -315,21 +310,6 @@ class CwtchNotifier { }); profileCN.getProfile(data["ProfileOnion"])?.contactList.resort(); break; - case "SetPeerAttribute": - if (data["Key"] == "local.name") { - if (profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["RemotePeer"]) != null) { - profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["RemotePeer"])!.nickname = data["Data"]; - } - } else if (data["Key"] == "local.archived") { - if (profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["RemotePeer"]) != null) { - profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["RemotePeer"])!.isArchived = data["Data"] == "true"; - } - } else if (data["Key"] == "LastKnowSignature") { - // group syncing information that isn't relevant to the UI... - } else { - EnvironmentConfig.debugLog("unhandled set peer attribute event: ${data['Key']}"); - } - break; case "NewRetValMessageFromPeer": if (data["Path"] == "profile.name") { if (data["Data"].toString().trim().length > 0) { diff --git a/pubspec.yaml b/pubspec.yaml index f116e49d..6e0326d0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.4.0+22 +version: 1.5.0+23 environment: sdk: ">=2.12.0 <3.0.0"