mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-26 21:07:58 +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
|
||||
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
|
||||
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