Do not auto-leave groups you have requested to join.

fork-5.53.8
Cody Henthorne 2022-04-21 11:30:13 -04:00
rodzic f1ab0a05f1
commit 2f551ee3f2
2 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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>