mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-21 22:02:06 +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