~singpolyma/cheogram-android

ffc1daaa56f1246c97777c1c74b18e204dbc69e2 — Stephen Paul Weber 2 years ago 2924ec0
any means none means false (ie there exist) unless upstream reports a reason
M src/main/java/eu/siacs/conversations/entities/Presences.java => src/main/java/eu/siacs/conversations/entities/Presences.java +2 -1
@@ 152,7 152,8 @@ public class Presences {
    public boolean anyIdentity(final String category, final String type) {
        synchronized (this.presences) {
            if (this.presences.size() == 0) {
                return true;
                // https://github.com/iNPUTmice/Conversations/issues/4230
                return false;
            }
            for (Presence presence : this.presences.values()) {
                ServiceDiscoveryResult disco = presence.getServiceDiscoveryResult();

M src/main/java/eu/siacs/conversations/services/XmppConnectionService.java => src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +1 -2
@@ 234,8 234,7 @@ public class XmppConnectionService extends Service {
            }
        }

        if (contact.getPresences().size() > 0 &&
            contact.getPresences().anyIdentity("gateway", "pstn")) {
        if (contact.getPresences().anyIdentity("gateway", "pstn")) {
            contact.registerAsPhoneAccount(this);
        }
    };