Browse Source

Version 5.2.3

Threema 1 year ago
parent
commit
14388d856b

+ 2 - 2
app/build.gradle

@@ -18,9 +18,9 @@ if (getGradle().getStartParameter().getTaskRequests().toString().contains("Hms")
 }
 
 // version codes
-def app_version = "5.2.2"
+def app_version = "5.2.3"
 def beta_suffix = "" // with leading dash
-def defaultVersionCode = 935
+def defaultVersionCode = 936
 
 /**
  * Return the git hash, if git is installed.

+ 1 - 3
app/src/libre/play/release-notes/de/default.txt

@@ -1,3 +1 @@
-* Geführte Hilfestellung für verschiedene Probleme der Systemkonfiguration
-
-* Fehlerbehebung und Performance-Verbesserungen
+* Ein Fehler wurde behoben, durch den unbekannte Gruppenmitglieder versehentlich zur Kontaktliste hinzugefügt wurden.

+ 1 - 3
app/src/libre/play/release-notes/en-US/default.txt

@@ -1,3 +1 @@
-* Guided self-help for various system configuration problems
-
-* Bug fixes and performance improvements
+* Fixed a bug where unknown group members were accidentally added to the contact list

+ 1 - 1
app/src/main/java/ch/threema/app/groupcontrol/csp/IncomingGroupSetupTask.kt

@@ -122,7 +122,7 @@ class IncomingGroupSetupTask(
         // 5. For each member of members, create a hidden contact if not already present in the
         // contact list.
         val unknownContacts = members.filter { contactService.getByIdentity(it) == null }
-        contactService.createContactsByIdentities(unknownContacts)
+        contactService.createContactsByIdentities(unknownContacts, true)
 
         // 6. Create or update the group with the given members plus the sender (creator).
         if (group == null) {

+ 2 - 2
app/src/main/java/ch/threema/app/services/ContactService.java

@@ -337,7 +337,7 @@ public interface ContactService extends AvatarService<ContactModel> {
 	@NonNull ContactModel createContactByIdentity(String identity, boolean force, boolean hiddenDefault) throws InvalidEntryException, EntryAlreadyExistsException, PolicyViolationException;
 
 	/**
-	 * Create contacts for all provided identities. Note that contacts are also created when block
+	 * Create (optionally hidden) contacts for all provided identities. Note that contacts are also created when block
 	 * unknown is active or th_disable_add_contact is set to true.
 	 * Contacts are added with acquaintance level 'group'.
 	 * There is no contact created for an identity if
@@ -345,7 +345,7 @@ public interface ContactService extends AvatarService<ContactModel> {
 	 *  - there is already a contact for that identity
 	 *  - the identity public key cannot be fetched (404)
 	 */
-	void createContactsByIdentities(@NonNull List<String> identities);
+	void createContactsByIdentities(@NonNull List<String> identities, boolean hideContactByDefault);
 
 	VerificationLevel getInitialVerificationLevel(ContactModel contactModel);
 

+ 3 - 3
app/src/main/java/ch/threema/app/services/ContactServiceImpl.java

@@ -1009,7 +1009,7 @@ public class ContactServiceImpl implements ContactService {
 	}
 
 	@Override
-	public void createContactsByIdentities(@NonNull List<String> identities) {
+	public void createContactsByIdentities(@NonNull List<String> identities, boolean hideContactByDefault) {
 		List<String> newIdentities = StreamSupport.stream(identities)
 				.filter(identity -> {
 					if (identity == null) {
@@ -1034,7 +1034,7 @@ public class ContactServiceImpl implements ContactService {
 			for (APIConnector.FetchIdentityResult result : apiConnector.fetchIdentities(newIdentities)) {
 				ContactModel contactModel = createContactByFetchIdentityResult(result);
 				if (contactModel != null) {
-					contactStore.addContact(contactModel);
+					contactStore.addContact(contactModel, hideContactByDefault);
 				}
 			}
 		} catch (Exception e) {
@@ -1614,7 +1614,7 @@ public class ContactServiceImpl implements ContactService {
 	}
 
 	/**
-	 * Create a contact by an identity fetch result.
+	 * Create a visible (i.e. non-hidden) contact by an identity fetch result but do NOT save it yet.
 	 *
 	 * @param result the result of the identity fetch
 	 * @return the contact model if the fetch was successful, null otherwise