mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Do not auto-leave groups you have requested to join.
This commit is contained in:
@@ -586,7 +586,7 @@ public class GroupsV2StateProcessor {
|
||||
|
||||
Log.i(TAG, String.format("Added as a full member of %s by %s", groupId, addedBy.getId()));
|
||||
|
||||
if (addedBy.isBlocked()) {
|
||||
if (addedBy.isBlocked() && (inputGroupState.getLocalState() == null || !DecryptedGroupUtil.isRequesting(inputGroupState.getLocalState(), selfAci.uuid()))) {
|
||||
Log.i(TAG, "Added by a blocked user. Leaving group.");
|
||||
ApplicationDependencies.getJobManager().add(new LeaveGroupV2Job(groupId));
|
||||
//noinspection UnnecessaryReturnStatement
|
||||
|
||||
@@ -232,6 +232,10 @@ public final class DecryptedGroupUtil {
|
||||
findRequestingByUuid(group.getRequestingMembersList(), uuid).isPresent();
|
||||
}
|
||||
|
||||
public static boolean isRequesting(DecryptedGroup group, UUID uuid) {
|
||||
return findRequestingByUuid(group.getRequestingMembersList(), uuid).isPresent();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the uuid from the full members of a group.
|
||||
* <p>
|
||||
|
||||
Reference in New Issue
Block a user