fix fingerprint for otr

This commit is contained in:
Christian Schneppe 2020-01-24 20:52:19 +01:00
parent b9962f7b50
commit ac88ed360b
No known key found for this signature in database
GPG key ID: F30B8D686B44D87E

View file

@ -14,6 +14,7 @@ import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.regex.Pattern;
import rocks.xmpp.addr.Jid;
@ -25,6 +26,7 @@ public class XmppUri {
public static final String ACTION_ROSTER = "roster";
private static final String OMEMO_URI_PARAM = "omemo-sid-";
private static final String OTR_URI_PARAM = "otr-fingerprint";
public static Pattern XMPP_URI = Patterns.XMPP_PATTERN;
protected Uri uri;
protected String jid;
private List<Fingerprint> fingerprints = new ArrayList<>();
@ -247,6 +249,10 @@ public class XmppUri {
public final String fingerprint;
final int deviceId;
public Fingerprint(FingerprintType type, String fingerprint) {
this(type, fingerprint, 0);
}
public Fingerprint(FingerprintType type, String fingerprint, int deviceId) {
this.type = type;
this.fingerprint = fingerprint;