mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-24 03:27:59 +01:00
Merge pull request #341 from vanitasvitae/prekeyid
OMEMO: Allow prekey ID 0
This commit is contained in:
commit
944dd71976
1 changed files with 2 additions and 2 deletions
|
@ -60,8 +60,8 @@ public abstract class OmemoBundleElement implements ExtensionElement {
|
|||
* @param preKeysB64 HashMap of base64 encoded preKeys
|
||||
*/
|
||||
public OmemoBundleElement(int signedPreKeyId, String signedPreKeyB64, String signedPreKeySigB64, String identityKeyB64, HashMap<Integer, String> preKeysB64) {
|
||||
if (signedPreKeyId <= 0) {
|
||||
throw new IllegalArgumentException("signedPreKeyId MUST be greater than 0.");
|
||||
if (signedPreKeyId < 0) {
|
||||
throw new IllegalArgumentException("signedPreKeyId MUST be greater than or equal to 0.");
|
||||
}
|
||||
this.signedPreKeyId = signedPreKeyId;
|
||||
this.signedPreKeyB64 = StringUtils.requireNotNullNorEmpty(signedPreKeyB64, "signedPreKeyB64 MUST NOT be null nor empty.");
|
||||
|
|
Loading…
Reference in a new issue