mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-26 06:12:06 +01:00
Fix XMPP key selection strategy by auto appending xmpp: if missing
This commit is contained in:
parent
e7ff9f0354
commit
db15a3e962
1 changed files with 8 additions and 2 deletions
|
@ -24,7 +24,10 @@ public class XMPP {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean accept(String jid, PGPPublicKeyRing keyRing) {
|
public boolean accept(String jid, PGPPublicKeyRing keyRing) {
|
||||||
return super.accept("xmpp:" + jid, keyRing);
|
if (!jid.matches("^xmpp:.+$")) {
|
||||||
|
jid = "xmpp:" + jid;
|
||||||
|
}
|
||||||
|
return super.accept(jid, keyRing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +35,10 @@ public class XMPP {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean accept(String jid, PGPSecretKeyRing keyRing) {
|
public boolean accept(String jid, PGPSecretKeyRing keyRing) {
|
||||||
return super.accept("xmpp:" + jid, keyRing);
|
if (!jid.matches("^xmpp:.+$")) {
|
||||||
|
jid = "xmpp:" + jid;
|
||||||
|
}
|
||||||
|
return super.accept(jid, keyRing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue